Skip QEMU termination tests for != linux/amd64

This commit is contained in:
Nils Hanke 2022-10-24 18:33:38 +02:00
parent 7500eb3e39
commit 3de5475f71

View File

@ -9,6 +9,7 @@ package cloudcmd
import (
"context"
"errors"
"runtime"
"testing"
"github.com/edgelesssys/constellation/v2/internal/cloud/cloudprovider"
@ -76,6 +77,14 @@ func TestTerminator(t *testing.T) {
t.Run(name, func(t *testing.T) {
assert := assert.New(t)
// Skip QEMU tests on non-Linux
// In theory the tests are fine but in reality creation/termination is marked as not supported so termination doesn't need to be supported, too.
if tc.provider == cloudprovider.QEMU {
if runtime.GOOS != "linux" || runtime.GOARCH != "amd64" {
t.Skip()
}
}
terminator := &Terminator{
newTerraformClient: func(ctx context.Context, provider cloudprovider.Provider) (terraformClient, error) {
return tc.tfClient, tc.newTfClientErr