Skip to content

Commit

Permalink
fix easy windows fileset cases
Browse files Browse the repository at this point in the history
  • Loading branch information
fwereade committed Apr 22, 2024
1 parent 4058f20 commit 1183fb4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion gotfparse/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ require (
google.golang.org/protobuf v1.33.0 // indirect
)

replace github.com/aquasecurity/trivy v0.50.1 => github.com/cloud-custodian/trivy v0.0.0-20240422192550-b77eee593776
replace github.com/aquasecurity/trivy v0.50.1 => github.com/cloud-custodian/trivy v0.0.0-20240422215648-c0445e1282ef
4 changes: 2 additions & 2 deletions gotfparse/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cloud-custodian/trivy v0.0.0-20240422192550-b77eee593776 h1:9fFVEMTfkfTwqHdzTHdq9wQmBSmqDu5QhcaW5eoX+LY=
github.com/cloud-custodian/trivy v0.0.0-20240422192550-b77eee593776/go.mod h1:J1fAS5qlA63Amg4RP5fF8QsF67xvZC5RPZORsibbQQs=
github.com/cloud-custodian/trivy v0.0.0-20240422215648-c0445e1282ef h1:LRduLp4vS27uFGqlze4G2HIeFJtbiN/WyagGL16rrXo=
github.com/cloud-custodian/trivy v0.0.0-20240422215648-c0445e1282ef/go.mod h1:J1fAS5qlA63Amg4RP5fF8QsF67xvZC5RPZORsibbQQs=
github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU=
github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
Expand Down
14 changes: 6 additions & 8 deletions tests/test_tfparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,25 +490,23 @@ def test_funcs(tmp_path):
"check_file": ANY,
"check_fileexists": True,
"check_fileset_abs_path": ANY,
"check_fileset_mod_path": ANY,
"check_fileset_rel_path": ANY,
"check_fileset_wild_rel_path": ANY,
"check_fileset_mod_path": ["x.py", "y.py"],
"check_fileset_rel_path": ["x.py", "y.py"],
"check_fileset_wild_rel_path": ["files/x.py", "files/y.py"],
"check_mod_path": ".",
"check_tolist": ["a", "b", "c"],
"check_tomap": {"a": 1, "b": 2},
"check_toset_int": [1, 2, 3],
"check_toset_str": ["a", "b", "c"],
"check_trimprefix": "/def",
"lambdas_list": ["abc", "xyz"],
"lambdas_list": ANY,
"modules_list": ["x", "y", "z"],
}
if platform.system() == "Windows":
assert actual["check_file"] == "test\r\n\r\n"
# fileset doesn't currently work on windows
# fileset outside root doesn't currently work on windows
return

assert actual["check_file"] == "test\n\n"
assert len(actual["check_fileset_abs_path"]) > 0
assert actual["check_fileset_mod_path"] == ["x.py", "y.py"]
assert actual["check_fileset_rel_path"] == ["x.py", "y.py"]
assert actual["check_fileset_wild_rel_path"] == ["files/x.py", "files/y.py"]
assert actual["lambdas_list"] == ["abc", "xyz"]

0 comments on commit 1183fb4

Please sign in to comment.