From e87515ec59b708890bec8f287d759163a056c288 Mon Sep 17 00:00:00 2001 From: Mike Cohen Date: Wed, 23 Aug 2023 22:09:06 +1000 Subject: [PATCH] Fixed test --- artifacts/definitions/Linux/Debian/AptSources.yaml | 4 +++- artifacts/testdata/server/testcases/debian.in.yaml | 10 ++++++++-- artifacts/testdata/server/testcases/debian.out.yaml | 11 ++++++----- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/artifacts/definitions/Linux/Debian/AptSources.yaml b/artifacts/definitions/Linux/Debian/AptSources.yaml index 4dfe361e367..debe7368bde 100644 --- a/artifacts/definitions/Linux/Debian/AptSources.yaml +++ b/artifacts/definitions/Linux/Debian/AptSources.yaml @@ -466,7 +466,9 @@ sources: -- For each parsed apt .list file line produce some output. SELECT * from foreach( - row={SELECT * FROM parsed_apt_lines}, + row={ + SELECT * FROM parsed_apt_lines + }, query={ SELECT * FROM parse_cache_or_pass }) diff --git a/artifacts/testdata/server/testcases/debian.in.yaml b/artifacts/testdata/server/testcases/debian.in.yaml index 3bfeab23ef0..3f82f07d6fc 100644 --- a/artifacts/testdata/server/testcases/debian.in.yaml +++ b/artifacts/testdata/server/testcases/debian.in.yaml @@ -13,13 +13,19 @@ Queries: aptCacheDirectory=srcDir + "/artifacts/testdata/files/debian/" ) - - SELECT "" AS Source, OSPath.Basename as OSPath, * + - SELECT OSPath.Basename as OSPath, + NULL AS Mtime, + NULL AS Ctime, + NULL AS Atime, + NULL AS Source, * + FROM Artifact.Linux.Debian.AptSources( source="SourcesCacheFiles", linuxAptSourcesGlobs=[dict(ListGlobs=srcDir + "/artifacts/testdata/files/debian/sources.list")], aptCacheDirectory=srcDir + "/artifacts/testdata/files/debian/" ) - WHERE OSPath + WHERE Record + - SELECT * FROM Artifact.Linux.Debian.Packages( diff --git a/artifacts/testdata/server/testcases/debian.out.yaml b/artifacts/testdata/server/testcases/debian.out.yaml index a0761647278..a30a9d27a37 100644 --- a/artifacts/testdata/server/testcases/debian.out.yaml +++ b/artifacts/testdata/server/testcases/debian.out.yaml @@ -460,13 +460,14 @@ SELECT OSPath.Basename AS OSPath, * FROM Artifact.Linux.Debian.AptSources( sourc "Types": "deb", "_Source": "Linux.Debian.AptSources/SourcesFlattened" } -]SELECT "" AS Source, OSPath.Basename as OSPath, * FROM Artifact.Linux.Debian.AptSources( source="SourcesCacheFiles", linuxAptSourcesGlobs=[dict(ListGlobs=srcDir + "/artifacts/testdata/files/debian/sources.list")], aptCacheDirectory=srcDir + "/artifacts/testdata/files/debian/" ) WHERE OSPath[ +]SELECT OSPath.Basename as OSPath, NULL AS Mtime, NULL AS Ctime, NULL AS Atime, NULL AS Source, * +FROM Artifact.Linux.Debian.AptSources( source="SourcesCacheFiles", linuxAptSourcesGlobs=[dict(ListGlobs=srcDir + "/artifacts/testdata/files/debian/sources.list")], aptCacheDirectory=srcDir + "/artifacts/testdata/files/debian/" ) WHERE Record[ { - "Source": "", "OSPath": "au.archive.ubuntu.com_ubuntu_dists_jammy_InRelease", - "Mtime": "2023-08-23T10:45:25Z", - "Ctime": "2023-08-23T10:45:25Z", - "Atime": "2023-08-23T10:55:22Z", + "Mtime": null, + "Ctime": null, + "Atime": null, + "Source": null, "Record": { "Release": "jammy", "Version": "22.04",