/
githubmirror
/
terraform
Обзор
Документация
Войти
/
githubmirror
/
terraform
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
internal/plugin/discovery/get_cache_test.go
32 строки
953 B
Radek Simko
make copyrightfix
17 фев 2026, 16:56
17 фев 2026, 16:56
0fe906f
Код
Авторство
О чём код?
// Copyright IBM Corp. 2014, 2026 // SPDX-License-Identifier: BUSL-1.1 package discovery import ( "testing" ) func TestLocalPluginCache(t *testing.T) { cache := NewLocalPluginCache("testdata/plugin-cache") foo1Path := cache.CachedPluginPath("provider", "foo", VersionStr("v0.0.1").MustParse()) if foo1Path == "" { t.Errorf("foo v0.0.1 not found; should have been found") } foo2Path := cache.CachedPluginPath("provider", "foo", VersionStr("v0.0.2").MustParse()) if foo2Path != "" { t.Errorf("foo v0.0.2 found at %s; should not have been found", foo2Path) } baz1Path := cache.CachedPluginPath("provider", "baz", VersionStr("v0.0.1").MustParse()) if baz1Path != "" { t.Errorf("baz v0.0.1 found at %s; should not have been found", baz1Path) } baz2Path := cache.CachedPluginPath("provider", "baz", VersionStr("v0.0.2").MustParse()) if baz1Path != "" { t.Errorf("baz v0.0.2 found at %s; should not have been found", baz2Path) } }