MCPcopy Index your code
hub / github.com/jetify-com/devbox / TestUpdateOtherSysInfoIsReplaced

Function TestUpdateOtherSysInfoIsReplaced

internal/devbox/update_test.go:126–192  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

124}
125
126func TestUpdateOtherSysInfoIsReplaced(t *testing.T) {
127 devbox := devboxForTesting(t)
128
129 raw := "hello@1.2.3"
130 sys1 := currentSystem(t)
131 sys2 := "system2"
132 devPkg := devpkg.PackageFromStringWithDefaults(raw, nil)
133 resolved := &lock.Package{
134 Resolved: "resolved-flake-reference",
135 Systems: map[string]*lock.SystemInfo{
136 sys1: {
137 Outputs: []lock.Output{
138 {
139 Name: "out",
140 Default: true,
141 Path: "store_path1",
142 },
143 },
144 },
145 sys2: {
146 Outputs: []lock.Output{
147 {
148 Name: "out",
149 Default: true,
150 Path: "store_path2",
151 },
152 },
153 },
154 },
155 }
156 lockfile := &lock.File{
157 Packages: map[string]*lock.Package{
158 raw: {
159 Resolved: "resolved-flake-reference",
160 Systems: map[string]*lock.SystemInfo{
161 sys1: {
162 Outputs: []lock.Output{
163 {
164 Name: "out",
165 Default: true,
166 Path: "store_path1",
167 },
168 },
169 },
170 sys2: {
171 Outputs: []lock.Output{
172 {
173 Name: "out",
174 Default: true,
175 Path: "mismatching_store_path",
176 },
177 },
178 },
179 },
180 },
181 },
182 }
183

Callers

nothing calls this directly

Calls 4

devboxForTestingFunction · 0.85
currentSystemFunction · 0.85

Tested by

no test coverage detected