mantle icon indicating copy to clipboard operation
mantle copied to clipboard

Add STACKIT tests

Open robinschneider opened this issue 4 months ago • 2 comments

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: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

robinschneider avatar Aug 19 '25 06:08 robinschneider

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

robinschneider avatar Aug 20 '25 13:08 robinschneider

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

@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

tormath1 avatar Aug 20 '25 14:08 tormath1