Skip to content

Commit

Permalink
Remove dependencies on lsb_release and add support for DNF and Rocky …
Browse files Browse the repository at this point in the history
…Linux 9
  • Loading branch information
joshrendek committed Sep 23, 2023
1 parent ffb1681 commit ad46b70
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,20 @@ func TestAgentRun(t *testing.T) {
f.On("FileExists", "/usr/bin/python").Return(true)
f.On("FileExists", "/usr/lib/python2.7/dist-packages/apt/__init__.py").Return(true).Maybe()
f.On("FileExists", "/usr/lib/python3/dist-packages/apt/__init__.py").Return(true).Maybe()
f.On("ReadFile", "/etc/os-release").Return([]byte(`
NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
`), nil)
fileReader = f

agentData := AgentData{
Expand Down

0 comments on commit ad46b70

Please sign in to comment.