tests/api: add container related test
Add a new cloud API test that will build an edge-container, upload it to the gitlab CI registry, fetch it from there, run it and compare that the OSTree commit contained in it is indeed the one we expect. Co-Developed-By: Christian Kellner <christian@kellner.me>
This commit is contained in:
parent
c845a11881
commit
1847a6ae05
7 changed files with 122 additions and 8 deletions
|
|
@ -53,7 +53,7 @@ type authenticationConfig struct {
|
|||
type containersConfig struct {
|
||||
AuthFilePath string `toml:"auth_file_path"`
|
||||
Domain string `toml:"domain"`
|
||||
Account string `toml:"account"`
|
||||
PathPrefix string `toml:"path_prefix"`
|
||||
CertPath string `toml:"cert_path"`
|
||||
TLSVerify bool `toml:"tls_verify"`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ type S3Configuration struct {
|
|||
type ContainersConfiguration struct {
|
||||
AuthFilePath string
|
||||
Domain string
|
||||
Account string
|
||||
PathPrefix string
|
||||
CertPath string
|
||||
TLSVerify *bool
|
||||
}
|
||||
|
|
@ -208,7 +208,7 @@ func uploadToS3(a *awscloud.AWS, outputDirectory, exportPath, bucket, key, filen
|
|||
}
|
||||
|
||||
func (impl *OSBuildJobImpl) getContainerClient(destination string, targetOptions *target.ContainerTargetOptions) (*container.Client, error) {
|
||||
destination, appliedDefaults := container.ApplyDefaultDomainPath(destination, impl.ContainersConfig.Domain, impl.ContainersConfig.Account)
|
||||
destination, appliedDefaults := container.ApplyDefaultDomainPath(destination, impl.ContainersConfig.Domain, impl.ContainersConfig.PathPrefix)
|
||||
client, err := container.NewClient(destination)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
|
|
@ -379,13 +379,13 @@ func main() {
|
|||
|
||||
var containersAuthFilePath string
|
||||
var containersDomain = ""
|
||||
var containersAccount = ""
|
||||
var containersPathPrefix = ""
|
||||
var containersCertPath = ""
|
||||
var containersTLSVerify = true
|
||||
if config.Containers != nil {
|
||||
containersAuthFilePath = config.Containers.AuthFilePath
|
||||
containersDomain = config.Containers.Domain
|
||||
containersAccount = config.Containers.Account
|
||||
containersPathPrefix = config.Containers.PathPrefix
|
||||
containersCertPath = config.Containers.CertPath
|
||||
containersTLSVerify = config.Containers.TLSVerify
|
||||
}
|
||||
|
|
@ -446,7 +446,7 @@ func main() {
|
|||
ContainersConfig: ContainersConfiguration{
|
||||
AuthFilePath: containersAuthFilePath,
|
||||
Domain: containersDomain,
|
||||
Account: containersAccount,
|
||||
PathPrefix: containersPathPrefix,
|
||||
CertPath: containersCertPath,
|
||||
TLSVerify: &containersTLSVerify,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue