Skip to content

Commit

Permalink
increased test timeout to 20min
Browse files Browse the repository at this point in the history
  • Loading branch information
thorstendb-ARM committed Aug 30, 2023
1 parent fdcb147 commit ad19894
Showing 1 changed file with 21 additions and 23 deletions.
44 changes: 21 additions & 23 deletions cmd/installer/root_pack_rm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,37 +143,35 @@ func TestRemovePack(t *testing.T) {
})

t.Run("test purge a pack with license", func(t *testing.T) {
/*
localTestingDir := "test-purge-pack-with-license"
assert.Nil(installer.SetPackRoot(localTestingDir, CreatePackRoot))
installer.UnlockPackRoot()
defer removePackRoot(localTestingDir)
localTestingDir := "test-purge-pack-with-license"
assert.Nil(installer.SetPackRoot(localTestingDir, CreatePackRoot))
installer.UnlockPackRoot()
defer removePackRoot(localTestingDir)

packPath := packWithLicense
packPath := packWithLicense

shortPackPath := shortenPackPath(packPath, false) // withVersion=true
shortPackPath := shortenPackPath(packPath, false) // withVersion=true

licenseFilePath := filepath.Join(installer.Installation.DownloadDir, filepath.Base(packPath)+".LICENSE.txt")
licenseFilePath := filepath.Join(installer.Installation.DownloadDir, filepath.Base(packPath)+".LICENSE.txt")

// Add a pack
addPack(t, packPath, ConfigType{})
assert.False(utils.FileExists(licenseFilePath))
// Add a pack
addPack(t, packPath, ConfigType{})
assert.False(utils.FileExists(licenseFilePath))

// Now extract its license license
addPack(t, packPath, ConfigType{
ExtractEula: true,
})
assert.True(utils.FileExists(licenseFilePath))
// Now extract its license license
addPack(t, packPath, ConfigType{
ExtractEula: true,
})
assert.True(utils.FileExists(licenseFilePath))

// Purge it
removePack(t, packPath, true, NotPublic, true) // withVersion=true, purge=true
// Purge it
removePack(t, packPath, true, NotPublic, true) // withVersion=true, purge=true

// Make sure pack is not purgeable
err := installer.RemovePack(shortPackPath, true, Timeout) // purge=true
assert.Equal(errs.ErrPackNotPurgeable, err)
// Make sure pack is not purgeable
err := installer.RemovePack(shortPackPath, true, Timeout) // purge=true
assert.Equal(errs.ErrPackNotPurgeable, err)

assert.False(utils.FileExists(licenseFilePath))
*/
assert.False(utils.FileExists(licenseFilePath))
})

t.Run("test remove latest version", func(t *testing.T) {
Expand Down

0 comments on commit ad19894

Please sign in to comment.