Skip to content

Commit

Permalink
test modified at timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
sallustfire committed Oct 24, 2024
1 parent 58b95e8 commit 16044cd
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
12 changes: 12 additions & 0 deletions examples/debian_snapshot/test_linux_amd64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,22 @@ commandTests:
- perl/now 5\.32\.1-4\+deb11u3 amd64 \[installed,local\]
- tzdata/now 2024a-0\+deb11u1 all \[installed,local\]
- nvidia-kernel-common/now 20151021\+13 amd64 \[installed,local\]
- name: "stat dpkg status"
command: "stat"
args: [ "-c", "%Y", "/var/lib/dpkg/status" ]
expectedOutput: ["1672560000"]
- name: "whoami"
command: "whoami"
expectedOutput: [r00t]
- name: "naive ca-certs check"
command: "head"
args: ["-1", "/etc/ssl/certs/ca-certificates.crt"]
expectedOutput: [-----BEGIN CERTIFICATE-----]

fileExistenceTests:
- name: 'dpkg status exists'
path: '/var/lib/dpkg/status'
shouldExist: true
permissions: '-rw-r--r--'
uid: 0
gid: 0
12 changes: 12 additions & 0 deletions examples/debian_snapshot/test_linux_arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,22 @@ commandTests:
- perl/now 5\.32\.1-4\+deb11u3 arm64 \[installed,local\]
- tzdata/now 2024a-0\+deb11u1 all \[installed,local\]
- nvidia-kernel-common/now 20151021\+13 arm64 \[installed,local\]
- name: "stat dpkg status"
command: "stat"
args: [ "-c", "%Y", "/var/lib/dpkg/status" ]
expectedOutput: [ "1672560000" ]
- name: "whoami"
command: "whoami"
expectedOutput: [r00t]
- name: "naive ca-certs check"
command: "head"
args: ["-1", "/etc/ssl/certs/ca-certificates.crt"]
expectedOutput: [-----BEGIN CERTIFICATE-----]

fileExistenceTests:
- name: 'dpkg status exists'
path: '/var/lib/dpkg/status'
shouldExist: true
permissions: '-rw-r--r--'
uid: 0
gid: 0
12 changes: 12 additions & 0 deletions examples/ubuntu_snapshot/test_linux_amd64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ commandTests:
- ncurses-base/now 6\.4\+20240113\-1ubuntu1 all \[installed,local\]
- perl/now 5\.38\.2\-3 amd64 \[installed,local\]
- tzdata/now 2024a\-1ubuntu1 all \[installed,local\]
- name: "stat dpkg status"
command: "stat"
args: [ "-c", "%Y", "/var/lib/dpkg/status" ]
expectedOutput: [ "1672560000" ]
- name: "whoami"
command: "whoami"
expectedOutput: [r00t]

fileExistenceTests:
- name: 'dpkg status exists'
path: '/var/lib/dpkg/status'
shouldExist: true
permissions: '-rw-r--r--'
uid: 0
gid: 0
19 changes: 19 additions & 0 deletions examples/ubuntu_snapshot/test_linux_arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,25 @@ commandTests:
- ncurses-base/now 6\.4\+20240113\-1ubuntu1 all \[installed,local\]
- perl/now 5\.38\.2\-3 arm64 \[installed,local\]
- tzdata/now 2024a\-1ubuntu1 all \[installed,local\]
- name: "stat dpkg status"
command: "stat"
args: [ "-c", "%Y", "/var/lib/dpkg/status" ]
expectedOutput: [ "1672560000" ]
- name: "whoami"
command: "whoami"
expectedOutput: [r00t]

fileExistenceTests:
- name: 'dpkg status exists'
path: '/var/lib/dpkg/status'
shouldExist: true
permissions: '-rw-r--r--'
uid: 0
gid: 0
fileExistenceTests:
- name: 'dpkg status exists'
path: '/var/lib/dpkg/status'
shouldExist: true
permissions: '-rw-r--r--'
uid: 0
gid: 0

0 comments on commit 16044cd

Please sign in to comment.