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

Function TestNewGlibcPatchFlake

internal/shellgen/flake_plan_test.go:33–56  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

31}
32
33func TestNewGlibcPatchFlake(t *testing.T) {
34 stdenv := flake.Ref{
35 Type: flake.TypeGitHub,
36 URL: "https://github.com/NixOS/nixpkgs",
37 Ref: "nixpkgs-unstable",
38 }
39
40 packages := devpkg.PackagesFromStringsWithOptions([]string{"python@latest"}, &lockMock{}, devopt.AddOpts{
41 Patch: string(configfile.PatchAlways),
42 })
43
44 patchFlake, err := newGlibcPatchFlake(stdenv, packages)
45 if err != nil {
46 t.Fatalf("expected no error, got %v", err)
47 }
48
49 if patchFlake.NixpkgsGlibcFlakeRef != stdenv.String() {
50 t.Errorf("expected NixpkgsGlibcFlakeRef to be %s, got %s", stdenv.String(), patchFlake.NixpkgsGlibcFlakeRef)
51 }
52
53 if len(patchFlake.Outputs.Packages) != 1 {
54 t.Errorf("expected 1 package in Outputs, got %d", len(patchFlake.Outputs.Packages))
55 }
56}

Callers

nothing calls this directly

Calls 3

StringMethod · 0.95
newGlibcPatchFlakeFunction · 0.85

Tested by

no test coverage detected