@@ -1554,10 +1554,9 @@ func TestAbstractShell_extractCacheWithDefaultFallbackKey(t *testing.T) {
15541554 const cacheEnvFile = "/some/path/to/runner-cache-env"
15551555
15561556 type expectations struct {
1557- cacheKeys []string
1558- usesEnvFile []bool
1559- warning []any
1560- notices [][]any
1557+ cacheKeys []string
1558+ warning []any
1559+ notices [][]any
15611560 }
15621561 type hashMode uint8
15631562 const (
@@ -1631,8 +1630,7 @@ func TestAbstractShell_extractCacheWithDefaultFallbackKey(t *testing.T) {
16311630 notices : [][]any {{`Skipping cache extraction due to %v` , fmt .Errorf ("empty cache key" )}},
16321631 },
16331632 withHashing : {
1634- cacheKeys : []string {"test-cache-key" , ".." },
1635- usesEnvFile : []bool {true , false },
1633+ cacheKeys : []string {"test-cache-key" , ".." },
16361634 },
16371635 },
16381636 },
@@ -1646,9 +1644,23 @@ func TestAbstractShell_extractCacheWithDefaultFallbackKey(t *testing.T) {
16461644 warning : []any {"CACHE_FALLBACK_KEY %q not allowed to end in %q" , "main-protected" , "-protected" },
16471645 },
16481646 withHashing : {
1649- cacheKeys : []string {"test-cache-key" },
1650- warning : []any {"CACHE_FALLBACK_KEY %q not allowed to end in %q" , "main-protected" , "-protected" },
1651- usesEnvFile : []bool {true },
1647+ cacheKeys : []string {"test-cache-key" },
1648+ warning : []any {"CACHE_FALLBACK_KEY %q not allowed to end in %q" , "main-protected" , "-protected" },
1649+ },
1650+ },
1651+ },
1652+ "using trailing dot suffix" : {
1653+ cacheType : "test" ,
1654+ cacheKey : "test-cache-key" ,
1655+ cacheFallbackKeyVarValue : "main-protected." ,
1656+ expectations : map [hashMode ]expectations {
1657+ withoutHashing : {
1658+ cacheKeys : []string {"test-cache-key" },
1659+ warning : []any {"CACHE_FALLBACK_KEY %q not allowed to end in %q" , "main-protected." , "-protected" },
1660+ },
1661+ withHashing : {
1662+ cacheKeys : []string {"test-cache-key" },
1663+ warning : []any {"CACHE_FALLBACK_KEY %q not allowed to end in %q" , "main-protected." , "-protected" },
16521664 },
16531665 },
16541666 },
@@ -1679,8 +1691,7 @@ func TestAbstractShell_extractCacheWithDefaultFallbackKey(t *testing.T) {
16791691 notices : [][]any {{`Skipping cache extraction due to %v` , fmt .Errorf ("empty cache key" )}},
16801692 },
16811693 withHashing : {
1682- cacheKeys : []string {"some-job-name/some-ref-name" , "." },
1683- usesEnvFile : []bool {true , false },
1694+ cacheKeys : []string {"some-job-name/some-ref-name" , "." },
16841695 },
16851696 },
16861697 },
0 commit comments