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: Mark Rossetti <[email protected]>
  • Loading branch information
marosset committed Aug 22, 2023
1 parent fa8a3d6 commit e0ea2f2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ jobs:
uses: actions/checkout@v2
- name: Run Windows Integration Tests
run: |
# required for running Volume and Disk tests
Install-WindowsFeature -name Hyper-V-PowerShell
$env:CSI_PROXY_GH_ACTIONS="TRUE"
go test -v -race ./integrationtests/...
go test --timeout 20m -v -race ./integrationtests/...
unit_tests:
strategy:
matrix:
Expand Down
2 changes: 0 additions & 2 deletions integrationtests/disk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ func TestDisk(t *testing.T) {
})

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

client, err := disk.New(diskapi.New())
require.Nil(t, err)
Expand Down Expand Up @@ -143,7 +142,6 @@ func TestDisk(t *testing.T) {
})

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

var err error
client, err := disk.New(diskapi.New())
Expand Down
5 changes: 0 additions & 5 deletions integrationtests/volume_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ func TestVolume(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

// these tests should be considered frozen from the API point of view
volumeClient, err := volume.New(volumeapi.New())
require.Nil(t, err)
Expand All @@ -32,12 +29,10 @@ func TestVolume(t *testing.T) {
require.Nil(t, err)

t.Run("MountVolume", func(t *testing.T) {
skipTestOnCondition(t, isRunningOnGhActions())
mountVolumeTests(diskClient, volumeClient, t)
})

t.Run("GetClosestVolumeFromTargetPath", func(t *testing.T) {
skipTestOnCondition(t, isRunningOnGhActions())
getClosestVolumeFromTargetPathTests(diskClient, volumeClient, t)
})
}
Expand Down

0 comments on commit e0ea2f2

Please sign in to comment.