@@ -12,12 +12,11 @@ import (
1212 "github.com/e2b-dev/infra/packages/shared/pkg/fcversion"
1313)
1414
15- // TestFirecrackerSupports pins the server-side version gate for the E2B
16- // snapshot feature set: only e2b-format releases >= 0.2.0 qualify; legacy
17- // _hash builds — including dev builds that mechanically carry the endpoints —
18- // and unparsable versions fail CLOSED. The gate feeds two call sites with
19- // different failure modes (in-place checkpoint falls back to resume-fresh;
20- // a filesystem-only pause is refused), so it must never err toward true.
15+ // TestFirecrackerSupports pins what the wrapper adds over the fcversion
16+ // predicates (whose floors sandbox_features_test.go owns): it reads the
17+ // RUNNING version off the sandbox config, and an unparsable version fails
18+ // CLOSED — a version-gated feature must never engage on a build outside the
19+ // release contract.
2120func TestFirecrackerSupports (t * testing.T ) {
2221 t .Parallel ()
2322
@@ -33,13 +32,10 @@ func TestFirecrackerSupports(t *testing.T) {
3332 cases := []struct {
3433 version string
3534 inPlace bool
36- fsOnly bool
3735 }{
38- {"v1.14-0.2.0" , true , true },
39- {"v1.14-1.0.0" , true , true },
40- {"v1.14-0.1.1" , false , true }, // fs-only ships from 0.1.0; in-place needs the 0.2.0 balloon API
41- {"v1.14.1_6ecb627" , false , false }, // legacy build carrying the endpoints: still refused
42- {"garbage" , false , false }, // unparsable: fail closed
36+ {"v1.14-0.2.0" , true },
37+ {"v1.14.1_6ecb627" , false }, // legacy build carrying the endpoints: still refused
38+ {"garbage" , false }, // unparsable: fail closed
4339 }
4440
4541 for _ , tc := range cases {
@@ -49,8 +45,6 @@ func TestFirecrackerSupports(t *testing.T) {
4945 sbx := mkSbx (tc .version )
5046 assert .Equal (t , tc .inPlace ,
5147 firecrackerSupports (t .Context (), sbx , "in-place checkpoint" , (* fcversion .Info ).HasInPlaceCheckpoint ))
52- assert .Equal (t , tc .fsOnly ,
53- firecrackerSupports (t .Context (), sbx , "filesystem-only snapshot" , (* fcversion .Info ).HasFilesystemSnapshots ))
5448 })
5549 }
5650}
0 commit comments