2023-10-20 02:33:26 -05:00
|
|
|
package skip_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
|
2024-01-31 23:34:07 -05:00
|
|
|
tskip "zotregistry.dev/zot/pkg/test/skip"
|
2023-10-20 02:33:26 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
// for code coverage.
|
|
|
|
func TestSkipS3(t *testing.T) {
|
|
|
|
envName := "S3MOCK_ENDPOINT"
|
|
|
|
envVal := os.Getenv(envName)
|
|
|
|
|
|
|
|
if len(envVal) > 0 {
|
|
|
|
defer os.Setenv(envName, envVal)
|
|
|
|
err := os.Unsetenv(envName)
|
|
|
|
assert.Equal(t, err, nil, "Error should be nil")
|
|
|
|
}
|
|
|
|
|
|
|
|
tskip.SkipS3(t)
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestSkipDynamo(t *testing.T) {
|
|
|
|
envName := "DYNAMODBMOCK_ENDPOINT"
|
|
|
|
envVal := os.Getenv(envName)
|
|
|
|
|
|
|
|
if len(envVal) > 0 {
|
|
|
|
defer os.Setenv(envName, envVal)
|
|
|
|
err := os.Unsetenv(envName)
|
|
|
|
assert.Equal(t, err, nil, "Error should be nil")
|
|
|
|
}
|
|
|
|
|
|
|
|
tskip.SkipDynamo(t)
|
|
|
|
}
|