Add STACKIT tests
Tests for new provider STACKIT
Add tests for new provider STACKIT STACKIT now has it's own oem image and does not yet have any tests.
How to use
make vendor && make build
./bin/ore stackit create-image --stackit-service-account-key-path "/home/ubuntu/.stackit/credentials.json" --stackit-project-id $STACKIT_PROJECT_ID -d
./bin/kola spawn --platform stackit --stackit-service-account-key-path "/home/ubuntu/.stackit/credentials.json" --stackit-project-id $STACKIT_PROJECT_ID --stackit-image $STACKIT_IMAGE_ID -d
Testing done
This is a work in progress PR and does not yet fully work
- [ ] Changelog entries added in the respective
changelog/directory (user-facing change, bug fix, security fix, update) - [ ] Inspected CI output for image differences:
/bootand/usrsize, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.
I am not sure how to get the image ID i set with --stackit-image into CreateServer function of cmd/platform/api/stackit/api.go
I am not sure how to get the image ID i set with
--stackit-imageintoCreateServerfunction ofcmd/platform/api/stackit/api.go
@robinschneider to provide the image ID to the CreateServer you need to add an option, let's say:
// cmd/kola/options.go
sv(&kola.STACKITOptions.ImageID, "stackit-image-id", "", "STACKIT image ID to deploy")
Then from the CreateServer function, you can access it through:
// platform/api/stackit/api.go
type API struct {
...
opts *Options
}
type Options struct {
*platform.Options
...
}
func (a *API) CreateServer(ctx context.Context, name iaas.CreateServerPayloadGetNameAttributeType, networkId iaas.CreateServerNetworkingGetNetworkIdAttributeType, keypairName iaas.CreateServerPayloadGetKeypairNameAttributeType, userData iaas.CreateServerPayloadGetUserDataAttributeType) (*Server, error) {
...
ID := a.opts.ImageID