Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hack/Dockerfile.golang
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.5-labs

ARG BASE_IMAGE=registry.fedoraproject.org/fedora:39
ARG BASE_IMAGE=registry.fedoraproject.org/fedora:42
FROM --platform=$TARGETPLATFORM ${BASE_IMAGE} AS base

# DO NOT UPDATE THIS BY HAND !!
Expand Down
2 changes: 1 addition & 1 deletion src/cloud-api-adaptor/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG BUILD_TYPE=dev
ARG BUILDER_BASE=quay.io/confidential-containers/golang-fedora:1.22.7-39
ARG BASE=registry.fedoraproject.org/fedora:39
ARG BASE=registry.fedoraproject.org/fedora:42

# This dockerfile uses Go cross-compilation to build the binary,
# we build on the host platform ($BUILDPLATFORM) and then copy the
Expand Down
1 change: 1 addition & 0 deletions src/cloud-api-adaptor/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ require (
github.com/spf13/cobra v1.7.0
golang.org/x/crypto v0.24.0
golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2
google.golang.org/api v0.162.0
google.golang.org/protobuf v1.33.0
k8s.io/api v0.26.2
k8s.io/apimachinery v0.26.2
Expand Down
2 changes: 1 addition & 1 deletion src/cloud-api-adaptor/podvm-mkosi/Dockerfile.podvm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Adapted from https://github.com/kubernetes-sigs/kind/blob/main/images/base/Dockerfile

ARG BASE_IMAGE=registry.fedoraproject.org/fedora:39
ARG BASE_IMAGE=registry.fedoraproject.org/fedora:42
FROM $BASE_IMAGE AS base

RUN echo "Installing Packages ..." \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# Build binaries for mkosi podvm image
#
FROM registry.fedoraproject.org/fedora:39
FROM registry.fedoraproject.org/fedora:42

ARG ARCH="amd64"
ARG YQ_ARCH="amd64"
Expand Down
56 changes: 56 additions & 0 deletions src/cloud-api-adaptor/test/e2e/gcp_common.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// (C) Copyright Confidential Containers Contributors
// SPDX-License-Identifier: Apache-2.0

package e2e

import (
"testing"
"strings"
"time"

pv "github.com/confidential-containers/cloud-api-adaptor/src/cloud-api-adaptor/test/provisioner/gcp"
"google.golang.org/api/compute/v1"
)

// GCPAssert implements the CloudAssert interface.
type GCPAssert struct {
Vpc *pv.GCPVPC
}

func NewGCPAssert() GCPAssert {
return GCPAssert{
Vpc: pv.GCPProps.GcpVPC,
}
}

func (aa GCPAssert) DefaultTimeout() time.Duration {
return 1 * time.Minute
}

func (aa GCPAssert) HasPodVM(t *testing.T, id string) {
podvmPrefix := "podvm-" + id

// Create a request to list instances in the specified project and zone.
req := pv.GCPProps.ComputeService.Instances.List(pv.GCPProps.ProjectID, pv.GCPProps.Zone)
instances, err := req.Do()
if err != nil {
t.Errorf("Failed to list instances: %v", err)
return
}

found := false
for _, instance := range instances.Items {
if instance.Status != "TERMINATED" && strings.HasPrefix(instance.Name, podvmPrefix) {
found = true
break
}
}

if !found {
t.Errorf("Podvm name=%s not found", id)
}
}

func (aa GCPAssert) GetInstanceType(t *testing.T, podName string) (string, error) {
return "", nil
}
104 changes: 104 additions & 0 deletions src/cloud-api-adaptor/test/e2e/gcp_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
//go:build gcp

// (C) Copyright Confidential Containers Contributors
// SPDX-License-Identifier: Apache-2.0

package e2e

import (
"testing"
)

func TestGCPCreateSimplePod(t *testing.T) {
assert := GCPAssert{}
DoTestCreateSimplePod(t, testEnv, assert)
}

func TestGCPCreatePodWithConfigMap(t *testing.T) {
t.Skip("Test not passing")
assert := NewGCPAssert()

DoTestCreatePodWithConfigMap(t, testEnv, assert)
}

func TestGCPCreatePodWithSecret(t *testing.T) {
t.Skip("Test not passing")
assert := NewGCPAssert()

DoTestCreatePodWithSecret(t, testEnv, assert)
}

// func TestAwsCreatePeerPodContainerWithExternalIPAccess(t *testing.T) {
// t.Skip("Test not passing")
// assert := NewAWSAssert()
//
// DoTestCreatePeerPodContainerWithExternalIPAccess(t, testEnv, assert)
// }
//
// func TestAwsCreatePeerPodWithJob(t *testing.T) {
// assert := NewAWSAssert()
//
// DoTestCreatePeerPodWithJob(t, testEnv, assert)
// }
//
// func TestAwsCreatePeerPodAndCheckUserLogs(t *testing.T) {
// assert := NewAWSAssert()
//
// DoTestCreatePeerPodAndCheckUserLogs(t, testEnv, assert)
// }
//
// func TestAwsCreatePeerPodAndCheckWorkDirLogs(t *testing.T) {
// assert := NewAWSAssert()
//
// DoTestCreatePeerPodAndCheckWorkDirLogs(t, testEnv, assert)
// }
//
// func TestAwsCreatePeerPodAndCheckEnvVariableLogsWithImageOnly(t *testing.T) {
// assert := NewAWSAssert()
//
// DoTestCreatePeerPodAndCheckEnvVariableLogsWithImageOnly(t, testEnv, assert)
// }
//
// func TestAwsCreatePeerPodAndCheckEnvVariableLogsWithDeploymentOnly(t *testing.T) {
// assert := NewAWSAssert()
//
// DoTestCreatePeerPodAndCheckEnvVariableLogsWithDeploymentOnly(t, testEnv, assert)
// }
//
// func TestAwsCreatePeerPodAndCheckEnvVariableLogsWithImageAndDeployment(t *testing.T) {
// assert := NewAWSAssert()
//
// DoTestCreatePeerPodAndCheckEnvVariableLogsWithImageAndDeployment(t, testEnv, assert)
// }
//
// func TestAwsCreatePeerPodWithLargeImage(t *testing.T) {
// assert := NewAWSAssert()
//
// DoTestCreatePeerPodWithLargeImage(t, testEnv, assert)
// }
//
// func TestAwsCreatePeerPodWithPVC(t *testing.T) {
// t.Skip("To be implemented")
// }
//
// func TestAwsCreatePeerPodWithAuthenticatedImagewithValidCredentials(t *testing.T) {
// t.Skip("To be implemented")
// }
//
// func TestAwsCreatePeerPodWithAuthenticatedImageWithInvalidCredentials(t *testing.T) {
// t.Skip("To be implemented")
// }
//
// func TestAwsCreatePeerPodWithAuthenticatedImageWithoutCredentials(t *testing.T) {
// t.Skip("To be implemented")
// }
//
// func TestAwsDeletePod(t *testing.T) {
// assert := NewAWSAssert()
// DoTestDeleteSimplePod(t, testEnv, assert)
// }
//
// func TestAwsCreateNginxDeployment(t *testing.T) {
// assert := NewAWSAssert()
// DoTestNginxDeployment(t, testEnv, assert)
// }
Loading