Skip to content

Commit

Permalink
Remove babbage directory segment from a handful of locations
Browse files Browse the repository at this point in the history
  • Loading branch information
smelc committed Oct 4, 2023
1 parent e5ed4f8 commit 931e5b6
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 48 deletions.
8 changes: 4 additions & 4 deletions cardano-cli/cardano-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -358,15 +358,15 @@ test-suite cardano-cli-golden
build-tool-depends: cardano-cli:cardano-cli
, tasty-discover:tasty-discover

other-modules: Test.Golden.Babbage.Governance.AnswerPoll
Test.Golden.Babbage.Governance.CreatePoll
Test.Golden.Babbage.Governance.VerifyPoll
Test.Golden.Byron.SigningKeys
other-modules: Test.Golden.Byron.SigningKeys
Test.Golden.Byron.Tx
Test.Golden.Byron.TxBody
Test.Golden.Byron.UpdateProposal
Test.Golden.Byron.Vote
Test.Golden.Byron.Witness
Test.Golden.EraBased.Governance.AnswerPoll
Test.Golden.EraBased.Governance.CreatePoll
Test.Golden.EraBased.Governance.VerifyPoll
Test.Golden.ErrorsSpec
Test.Golden.Governance.Action
Test.Golden.Governance.Committee
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{-# LANGUAGE OverloadedStrings #-}

module Test.Golden.Babbage.Governance.AnswerPoll where
module Test.Golden.EraBased.Governance.AnswerPoll where

import Control.Monad (void)

Expand All @@ -14,9 +14,9 @@ import qualified Hedgehog.Extras.Test.Golden as H

{- HLINT ignore "Use camelCase" -}

hprop_golden_babbageGovernanceAnswerPollNeg1Invalid :: Property
hprop_golden_babbageGovernanceAnswerPollNeg1Invalid = propertyOnce . H.moduleWorkspace "governance-answer-poll" $ \tempDir -> do
pollFile <- noteInputFile "test/cardano-cli-golden/files/golden/babbage/governance/polls/basic.json"
hprop_golden_governanceAnswerPollNeg1Invalid :: Property
hprop_golden_governanceAnswerPollNeg1Invalid = propertyOnce . H.moduleWorkspace "governance-answer-poll" $ \tempDir -> do
pollFile <- noteInputFile "test/cardano-cli-golden/files/golden/governance/polls/basic.json"
outFile <- H.noteTempFile tempDir "answer-file.json"

result <- tryExecCardanoCLI
Expand All @@ -30,10 +30,10 @@ hprop_golden_babbageGovernanceAnswerPollNeg1Invalid = propertyOnce . H.moduleWor

either (const H.success) (const H.failure) result

hprop_golden_babbageGovernanceAnswerPoll0 :: Property
hprop_golden_babbageGovernanceAnswerPoll0 = propertyOnce . H.moduleWorkspace "governance-answer-poll" $ \tempDir -> do
pollFile <- noteInputFile "test/cardano-cli-golden/files/golden/babbage/governance/polls/basic.json"
expectedAnswerFile <- noteInputFile "test/cardano-cli-golden/files/golden/babbage/governance/polls/basic.answer.0.json"
hprop_golden_governanceAnswerPoll0 :: Property
hprop_golden_governanceAnswerPoll0 = propertyOnce . H.moduleWorkspace "governance-answer-poll" $ \tempDir -> do
pollFile <- noteInputFile "test/cardano-cli-golden/files/golden/governance/polls/basic.json"
expectedAnswerFile <- noteInputFile "test/cardano-cli-golden/files/golden/governance/polls/basic.answer.0.json"
outFile <- H.noteTempFile tempDir "answer-file.json"

void $ execCardanoCLI
Expand All @@ -45,10 +45,10 @@ hprop_golden_babbageGovernanceAnswerPoll0 = propertyOnce . H.moduleWorkspace "go

H.diffFileVsGoldenFile outFile expectedAnswerFile

hprop_golden_babbageGovernanceAnswerPollPos1 :: Property
hprop_golden_babbageGovernanceAnswerPollPos1 = propertyOnce . H.moduleWorkspace "governance-answer-poll" $ \tempDir -> do
pollFile <- noteInputFile "test/cardano-cli-golden/files/golden/babbage/governance/polls/basic.json"
expectedAnswerFile <- noteInputFile "test/cardano-cli-golden/files/golden/babbage/governance/polls/basic.answer.1.json"
hprop_golden_governanceAnswerPollPos1 :: Property
hprop_golden_governanceAnswerPollPos1 = propertyOnce . H.moduleWorkspace "governance-answer-poll" $ \tempDir -> do
pollFile <- noteInputFile "test/cardano-cli-golden/files/golden/governance/polls/basic.json"
expectedAnswerFile <- noteInputFile "test/cardano-cli-golden/files/golden/governance/polls/basic.answer.1.json"
outFile <- H.noteTempFile tempDir "answer-file.json"

void $ execCardanoCLI
Expand All @@ -60,9 +60,9 @@ hprop_golden_babbageGovernanceAnswerPollPos1 = propertyOnce . H.moduleWorkspace

H.diffFileVsGoldenFile outFile expectedAnswerFile

hprop_golden_babbageGovernanceAnswerPollPos2Invalid :: Property
hprop_golden_babbageGovernanceAnswerPollPos2Invalid = propertyOnce . H.moduleWorkspace "governance-answer-poll" $ \tempDir -> do
pollFile <- noteInputFile "test/cardano-cli-golden/files/golden/babbage/governance/polls/basic.json"
hprop_golden_governanceAnswerPollPos2Invalid :: Property
hprop_golden_governanceAnswerPollPos2Invalid = propertyOnce . H.moduleWorkspace "governance-answer-poll" $ \tempDir -> do
pollFile <- noteInputFile "test/cardano-cli-golden/files/golden/governance/polls/basic.json"
outFile <- H.noteTempFile tempDir "answer-file.json"

result <- tryExecCardanoCLI
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{-# LANGUAGE OverloadedStrings #-}

module Test.Golden.Babbage.Governance.CreatePoll where
module Test.Golden.EraBased.Governance.CreatePoll where

import Control.Monad (void)

Expand All @@ -13,8 +13,8 @@ import qualified Hedgehog.Extras.Test.File as H

{- HLINT ignore "Use camelCase" -}

hprop_golden_babbageGovernanceCreatePoll :: Property
hprop_golden_babbageGovernanceCreatePoll =
hprop_golden_governanceCreatePoll :: Property
hprop_golden_governanceCreatePoll =
propertyOnce . H.moduleWorkspace "tmp" $ \tempDir -> do
pollFile <- noteTempFile tempDir "poll.json"

Expand All @@ -27,14 +27,14 @@ hprop_golden_babbageGovernanceCreatePoll =
]

void $ H.readFile pollFile
noteInputFile "test/cardano-cli-golden/files/golden/babbage/governance/create/basic.json"
noteInputFile "test/cardano-cli-golden/files/golden/governance/create/basic.json"
>>= H.readFile
>>= (H.===) stdout
H.assertFileOccurences 1 "GovernancePoll" pollFile
H.assertEndsWithSingleNewline pollFile

hprop_golden_babbageGovernanceCreateLongPoll :: Property
hprop_golden_babbageGovernanceCreateLongPoll =
hprop_golden_governanceCreateLongPoll :: Property
hprop_golden_governanceCreateLongPoll =
propertyOnce . H.moduleWorkspace "tmp" $ \tempDir -> do
pollFile <- noteTempFile tempDir "poll.json"

Expand All @@ -47,7 +47,7 @@ hprop_golden_babbageGovernanceCreateLongPoll =
]

void $ H.readFile pollFile
noteInputFile "test/cardano-cli-golden/files/golden/babbage/governance/create/long-text.json"
noteInputFile "test/cardano-cli-golden/files/golden/governance/create/long-text.json"
>>= H.readFile
>>= (H.===) stdout
H.assertFileOccurences 1 "GovernancePoll" pollFile
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}

module Test.Golden.Babbage.Governance.VerifyPoll where
module Test.Golden.EraBased.Governance.VerifyPoll where

import Cardano.Api

Expand All @@ -19,12 +19,12 @@ import qualified Hedgehog.Internal.Property as H

{- HLINT ignore "Use camelCase" -}

hprop_golden_babbageGovernanceVerifyPoll :: Property
hprop_golden_babbageGovernanceVerifyPoll = propertyOnce $ do
pollFile <- noteInputFile "test/cardano-cli-golden/files/golden/babbage/governance/polls/basic.json"
txFile <- noteInputFile "test/cardano-cli-golden/files/golden/babbage/governance/verify/valid"
hprop_golden_governanceVerifyPoll :: Property
hprop_golden_governanceVerifyPoll = propertyOnce $ do
pollFile <- noteInputFile "test/cardano-cli-golden/files/golden/governance/polls/basic.json"
txFile <- noteInputFile "test/cardano-cli-golden/files/golden/governance/verify/valid"
vkFile <- VerificationKeyFilePath . File <$>
noteInputFile "test/cardano-cli-golden/files/golden/babbage/governance/cold.vk"
noteInputFile "test/cardano-cli-golden/files/golden/governance/cold.vk"

stdout <- BSC.pack <$> execCardanoCLI
[ "babbage", "governance", "verify-poll"
Expand All @@ -39,10 +39,10 @@ hprop_golden_babbageGovernanceVerifyPoll = propertyOnce $ do
let expected = prettyPrintJSON $ serialiseToRawBytesHexText <$> [verificationKeyHash vk]
H.assert $ expected `BSC.isInfixOf` stdout

hprop_golden_babbageGovernanceVerifyPollMismatch :: Property
hprop_golden_babbageGovernanceVerifyPollMismatch = propertyOnce $ do
pollFile <- noteInputFile "test/cardano-cli-golden/files/golden/babbage/governance/polls/basic.json"
txFile <- noteInputFile "test/cardano-cli-golden/files/golden/babbage/governance/verify/mismatch"
hprop_golden_governanceVerifyPollMismatch :: Property
hprop_golden_governanceVerifyPollMismatch = propertyOnce $ do
pollFile <- noteInputFile "test/cardano-cli-golden/files/golden/governance/polls/basic.json"
txFile <- noteInputFile "test/cardano-cli-golden/files/golden/governance/verify/mismatch"

result <- tryExecCardanoCLI
[ "babbage", "governance", "verify-poll"
Expand All @@ -52,10 +52,10 @@ hprop_golden_babbageGovernanceVerifyPollMismatch = propertyOnce $ do

either (const H.success) (H.failWith Nothing) result

hprop_golden_babbageGovernanceVerifyPollNoAnswer :: Property
hprop_golden_babbageGovernanceVerifyPollNoAnswer = propertyOnce $ do
pollFile <- noteInputFile "test/cardano-cli-golden/files/golden/babbage/governance/polls/basic.json"
txFile <- noteInputFile "test/cardano-cli-golden/files/golden/babbage/governance/verify/none"
hprop_golden_governanceVerifyPollNoAnswer :: Property
hprop_golden_governanceVerifyPollNoAnswer = propertyOnce $ do
pollFile <- noteInputFile "test/cardano-cli-golden/files/golden/governance/polls/basic.json"
txFile <- noteInputFile "test/cardano-cli-golden/files/golden/governance/verify/none"

result <- tryExecCardanoCLI
[ "babbage", "governance", "verify-poll"
Expand All @@ -65,10 +65,10 @@ hprop_golden_babbageGovernanceVerifyPollNoAnswer = propertyOnce $ do

either (const H.success) (H.failWith Nothing) result

hprop_golden_babbageGovernanceVerifyPollMalformedAnswer :: Property
hprop_golden_babbageGovernanceVerifyPollMalformedAnswer = propertyOnce $ do
pollFile <- noteInputFile "test/cardano-cli-golden/files/golden/babbage/governance/polls/basic.json"
txFile <- noteInputFile "test/cardano-cli-golden/files/golden/babbage/governance/verify/malformed"
hprop_golden_governanceVerifyPollMalformedAnswer :: Property
hprop_golden_governanceVerifyPollMalformedAnswer = propertyOnce $ do
pollFile <- noteInputFile "test/cardano-cli-golden/files/golden/governance/polls/basic.json"
txFile <- noteInputFile "test/cardano-cli-golden/files/golden/governance/verify/malformed"

result <- tryExecCardanoCLI
[ "babbage", "governance", "verify-poll"
Expand All @@ -78,10 +78,10 @@ hprop_golden_babbageGovernanceVerifyPollMalformedAnswer = propertyOnce $ do

either (const H.success) (H.failWith Nothing) result

hprop_golden_babbageGovernanceVerifyPollInvalidAnswer :: Property
hprop_golden_babbageGovernanceVerifyPollInvalidAnswer = propertyOnce $ do
pollFile <- noteInputFile "test/cardano-cli-golden/files/golden/babbage/governance/polls/basic.json"
txFile <- noteInputFile "test/cardano-cli-golden/files/golden/babbage/governance/verify/invalid"
hprop_golden_governanceVerifyPollInvalidAnswer :: Property
hprop_golden_governanceVerifyPollInvalidAnswer = propertyOnce $ do
pollFile <- noteInputFile "test/cardano-cli-golden/files/golden/governance/polls/basic.json"
txFile <- noteInputFile "test/cardano-cli-golden/files/golden/governance/verify/invalid"

result <- tryExecCardanoCLI
[ "babbage", "governance", "verify-poll"
Expand Down

0 comments on commit 931e5b6

Please sign in to comment.