/
githubmirror
/
terraform
Обзор
Документация
Войти
/
githubmirror
/
terraform
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
internal/command/plugins_lock_test.go
30 строк
648 B
Sarah French
test: Update tests in command package to use t.Parallel (#38688)
08 июн 2026, 19:37
Не верифицирован
08 июн 2026, 19:37
ff406ab
Код
Авторство
О чём код?
// Copyright IBM Corp. 2014, 2026 // SPDX-License-Identifier: BUSL-1.1 package command import ( "os" "reflect" "testing" ) func TestPluginSHA256LockFile_Read(t *testing.T) { t.Parallel() f, err := os.CreateTemp(t.TempDir(), "tf-pluginsha1lockfile-test-") if err != nil { t.Fatalf("failed to create temporary file: %s", err) } f.Close() defer os.Remove(f.Name()) plf := &pluginSHA256LockFile{ Filename: f.Name(), } // Initially the file is invalid, so we should get an empty map. digests := plf.Read() if !reflect.DeepEqual(digests, map[string][]byte{}) { t.Errorf("wrong initial content %#v; want empty map", digests) } }