Skip to content

Commit

Permalink
removing test "test-purge-pack-with-license"
Browse files Browse the repository at this point in the history
  • Loading branch information
thorstendb-ARM committed Aug 30, 2023
1 parent 27c707b commit fdcb147
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions cmd/installer/root_pack_rm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,35 +143,37 @@ 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 fdcb147

Please sign in to comment.