SYNOPSIS

Displaying package environment details is a core feature.

SCENARIOS

rdopkg pkgenv basic usage

  • Given a distgit at Version 1.0.0 and Release 0.1,

  • Given a patches branch with 2 patches,

  • When I run rdopkg pkgenv,

  • Then command output contains Patches style:\s+branch,

  • Then command output contains Patches base:\s+N/A,

  • Then command output contains Patches base ref:\s+1.0.0 : existing git tag,

  • Then command output contains Version:\s+1.0.0,

  • Then command output contains VR:\s+1:1.0.0-0.1,

  • Then command output contains Release style:\s+generic,

  • Then command output contains Rls bump index:\s+last-numeric,

  • Then command output contains Local patches branch:\s+master-patches : \w+,

  • Then no new commit was created

rdopkg pkgenv without version tag and patches branch

  • Given a distgit at Version 0.1 and Release 2,

  • When I run rdopkg pkgenv,

  • Then command output contains VR:\s+1:0.1-2,

  • Then command output contains Patches base:\s+N/A,

  • Then command output contains Patches base ref:\s+0.1 : invalid git reference,

  • Then command output contains Local patches branch:\s+master-patches : not found

rdopkg pkgenv with valid patches_base

  • Given a distgit at Version 23 and Release 69,

  • Given a patches branch with 2 patches,

  • When I set .spec file patches_base to existing commit +42,

  • When I run rdopkg pkgenv,

  • Then command output contains Version:\s+23,

  • Then command output contains VR:\s+1:23-69,

  • Then command output contains Patches base:\s+\w+\+42,

  • Then command output contains Patches base ref:\s+\w+ : existing git commit,

  • Then command output contains Local patches branch:\s+master-patches : \w+

rdopkg pkgenv with invalid patches_base

  • Given a distgit at Version 0 and Release 0,

  • Given a patches branch with 2 patches,

  • When I set .spec file patches_base=OVER+9000,

  • When I run rdopkg pkgenv,

  • Then command output contains Version:\s+0,

  • Then command output contains VR:\s+1:0-0,

  • Then command output contains Patches base:\s+OVER\+9000,

  • Then command output contains Patches base ref:\s+OVER : invalid git reference