Ft/rework acceptance tests follow up (#684)

* Enable CI

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>

* Add default local file for IaaS image test

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>

* Opensearch acceptance test typo

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>

* Postgresflex acceptance test fix ignore

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>

* Redis acceptance test remove mid uuid

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>

* Objectstorage acceptance test ignore region for import

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>

* Add more environment variables for CI build

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>

---------

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>
This commit is contained in:
Alexander Dahmen 2025-02-20 13:36:31 +01:00 committed by GitHub
parent e2995347ec
commit a0c2c30ced
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 71 additions and 26 deletions

View file

@ -48,7 +48,7 @@ var (
// Default email: acc-test@sa.stackit.cloud
TestProjectUserEmail = getenv("TF_ACC_TEST_PROJECT_USER_EMAIL", "acc-test@sa.stackit.cloud")
// TestImageLocalFilePath is the local path to an image file used for image acceptance tests
TestImageLocalFilePath = os.Getenv("TF_ACC_TEST_IMAGE_LOCAL_FILE_PATH")
TestImageLocalFilePath = getenv("TF_ACC_TEST_IMAGE_LOCAL_FILE_PATH", "default")
ArgusCustomEndpoint = os.Getenv("TF_ACC_ARGUS_CUSTOM_ENDPOINT")
DnsCustomEndpoint = os.Getenv("TF_ACC_DNS_CUSTOM_ENDPOINT")
@ -432,3 +432,25 @@ func getenv(key, defaultValue string) string {
}
return val
}
// helper for local_file_path
// no real data is created
func CreateDefaultLocalFile() os.File {
// Define the file name and size
fileName := "test-512k.img"
size := 512 * 1024 // 512 KB
// Create the file
file, err := os.Create(fileName)
if err != nil {
panic(err)
}
// Seek to the desired position (512 KB)
_, err = file.Seek(int64(size), 0)
if err != nil {
panic(err)
}
return *file
}