mirror of
https://github.com/status-im/consul.git
synced 2025-02-22 10:28:31 +00:00
Co-authored-by: R.B. Boyer <4903+rboyer@users.noreply.github.com> Co-authored-by: R.B. Boyer <rb@hashicorp.com> Co-authored-by: Freddy <freddygv@users.noreply.github.com>
16 lines
367 B
Go
16 lines
367 B
Go
package tfgen
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestDockerImageResourceName(t *testing.T) {
|
|
fn := DockerImageResourceName
|
|
|
|
assert.Equal(t, "", fn(""))
|
|
assert.Equal(t, "abcdefghijklmnopqrstuvwxyz0123456789-", fn("abcdefghijklmnopqrstuvwxyz0123456789-"))
|
|
assert.Equal(t, "hashicorp-consul-1-15-0", fn("hashicorp/consul:1.15.0"))
|
|
}
|