Skip to content

Commit

Permalink
Enable tests than can now run on GH actions
Browse files Browse the repository at this point in the history
Signed-off-by: James Sturtevant <[email protected]>
  • Loading branch information
jsturtevant authored and ritazh committed Aug 21, 2023
1 parent 0e83a68 commit 2523e66
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 29 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
go build -v -a -o ./bin/csi-proxy-api-gen.exe ./cmd/csi-proxy-api-gen
- name: Run Windows Integration Tests
run: |
# required for running Volume and Disk tests
Install-WindowsFeature -name Hyper-V-PowerShell
# start the CSI Proxy before running tests on windows
Start-Job -Name CSIProxy -ScriptBlock {
.\bin\csi-proxy.exe
Expand All @@ -28,7 +31,7 @@ jobs:
Write-Output "getting named pipes"
[System.IO.Directory]::GetFiles("\\.\\pipe\\")
$env:CSI_PROXY_GH_ACTIONS="TRUE"
go test -v -race ./integrationtests/...
go test -timeout 20m -v -race ./integrationtests/...
unit_tests:
strategy:
matrix:
Expand Down
4 changes: 0 additions & 4 deletions integrationtests/disk_v1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ func v1DiskTests(t *testing.T) {
})

t.Run("Get/SetDiskState", func(t *testing.T) {
skipTestOnCondition(t, isRunningOnGhActions())

client, err := diskv1client.NewClient()
require.NoError(t, err)

Expand Down Expand Up @@ -144,8 +142,6 @@ func v1DiskTests(t *testing.T) {
})

t.Run("PartitionDisk", func(t *testing.T) {
skipTestOnCondition(t, isRunningOnGhActions())

var err error
client, err := diskv1client.NewClient()
require.NoError(t, err)
Expand Down
4 changes: 0 additions & 4 deletions integrationtests/disk_v1alpha1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ func v1alpha1DiskTests(t *testing.T) {
})

t.Run("Rescan", func(t *testing.T) {
skipTestOnCondition(t, isRunningOnGhActions())

client, err := diskv1alpha1client.NewClient()
require.NoError(t, err)

Expand All @@ -47,8 +45,6 @@ func v1alpha1DiskTests(t *testing.T) {
})

t.Run("PartitionDisk", func(t *testing.T) {
skipTestOnCondition(t, isRunningOnGhActions())

var err error
client, err := diskv1alpha1client.NewClient()
require.NoError(t, err)
Expand Down
4 changes: 0 additions & 4 deletions integrationtests/disk_v1beta1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ func v1beta1DiskTests(t *testing.T) {
})

t.Run("Get/SetDiskState", func(t *testing.T) {
skipTestOnCondition(t, isRunningOnGhActions())

client, err := diskv1beta1client.NewClient()
require.NoError(t, err)

Expand Down Expand Up @@ -86,8 +84,6 @@ func v1beta1DiskTests(t *testing.T) {
})

t.Run("PartitionDisk", func(t *testing.T) {
skipTestOnCondition(t, isRunningOnGhActions())

var err error
client, err := diskv1beta1client.NewClient()
require.NoError(t, err)
Expand Down
4 changes: 0 additions & 4 deletions integrationtests/disk_v1beta2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ func v1beta2DiskTests(t *testing.T) {
})

t.Run("Get/SetDiskState", func(t *testing.T) {
skipTestOnCondition(t, isRunningOnGhActions())

client, err := diskv1beta2client.NewClient()
require.NoError(t, err)

Expand Down Expand Up @@ -127,8 +125,6 @@ func v1beta2DiskTests(t *testing.T) {
})

t.Run("PartitionDisk", func(t *testing.T) {
skipTestOnCondition(t, isRunningOnGhActions())

var err error
client, err := diskv1beta2client.NewClient()
require.NoError(t, err)
Expand Down
4 changes: 0 additions & 4 deletions integrationtests/disk_v1beta3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ func v1beta3DiskTests(t *testing.T) {
})

t.Run("Get/SetDiskState", func(t *testing.T) {
skipTestOnCondition(t, isRunningOnGhActions())

client, err := diskv1beta3client.NewClient()
require.NoError(t, err)

Expand Down Expand Up @@ -144,8 +142,6 @@ func v1beta3DiskTests(t *testing.T) {
})

t.Run("PartitionDisk", func(t *testing.T) {
skipTestOnCondition(t, isRunningOnGhActions())

var err error
client, err := diskv1beta3client.NewClient()
require.NoError(t, err)
Expand Down
10 changes: 2 additions & 8 deletions integrationtests/volume_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,32 +148,26 @@ func TestVolumeAPIs(t *testing.T) {
negativeVolumeTests(t)
})

// TODO: These tests will fail on Github Actions because Hyper-V is disabled
// see https://github.com/actions/virtual-environments/pull/2525
// Github Actions WS 2022 supports hyper-v
// must install management tools manually

// these tests should be considered frozen from the API point of view
t.Run("v1alpha1Tests", func(t *testing.T) {
skipTestOnCondition(t, isRunningOnGhActions())
v1alpha1VolumeTests(t)
})
t.Run("v1beta1Tests", func(t *testing.T) {
skipTestOnCondition(t, isRunningOnGhActions())
v1beta1VolumeTests(t)
})
t.Run("v1beta2Tests", func(t *testing.T) {
skipTestOnCondition(t, isRunningOnGhActions())
v1beta2VolumeTests(t)
})
t.Run("v1beta3Tests", func(t *testing.T) {
skipTestOnCondition(t, isRunningOnGhActions())
v1beta3VolumeTests(t)
})
t.Run("v1Tests", func(t *testing.T) {
skipTestOnCondition(t, isRunningOnGhActions())
v1VolumeTests(t)
})
t.Run("v2alpha1Tests", func(t *testing.T) {
skipTestOnCondition(t, isRunningOnGhActions())
v2alpha1VolumeTests(t)
})
}

0 comments on commit 2523e66

Please sign in to comment.