From 11dfd3774775c179cae2360b174954f6c99fbbc0 Mon Sep 17 00:00:00 2001 From: Jayash Satolia Date: Wed, 16 Aug 2023 17:03:31 +0530 Subject: [PATCH] Changed current-sprint to staging --- .github/workflows/tokenomics_ci.yml | 26 +++++++++++------------ tests/tokenomics_tests/allocation_test.go | 6 +++--- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/tokenomics_ci.yml b/.github/workflows/tokenomics_ci.yml index 0dfe56cfaa..4c76cf90e3 100644 --- a/.github/workflows/tokenomics_ci.yml +++ b/.github/workflows/tokenomics_ci.yml @@ -9,7 +9,7 @@ on: inputs: repo_snapshots_branch: description: 'branch of repo-snapshots to derive images and branches from.' - default: 'current-sprint' + default: 'staging' required: true existing_network: description: '(OPTIONAL): *EXISTING NETWORK* to run system tests against *INSTEAD OF* deploying a new network. [example: dev.0chain.net]' @@ -107,7 +107,7 @@ jobs: if: github.event_name == 'push' || github.event.inputs.existing_network == '' uses: 0chain/actions/deploy-0chain-2b2v@feature/tokenomics_suite with: - repo_snapshots_branch: current-sprint + repo_snapshots_branch: staging kube_config: ${{ secrets[format('DEV{0}KC', env.RUNNER_NUMBER)] }} teardown_condition: "TESTS_PASSED" SUBGRAPH_API_URL: ${{ secrets.SUBGRAPH_API_URL }} @@ -120,7 +120,7 @@ jobs: - name: "Run Allocation System tests" uses: 0chain/actions/run-system-tests@feature/tokenomics_suite with: - repo_snapshots_branch: current-sprint + repo_snapshots_branch: staging system_tests_branch: ${{ env.CURRENT_BRANCH }} network: ${{ env.NETWORK_URL }} svc_account_secret: ${{ secrets.SVC_ACCOUNT_SECRET }} @@ -142,7 +142,7 @@ jobs: if: github.event_name == 'push' || github.event.inputs.existing_network == '' uses: 0chain/actions/deploy-0chain-2b2v@feature/tokenomics_suite with: - repo_snapshots_branch: current-sprint + repo_snapshots_branch: staging kube_config: ${{ secrets[format('DEV{0}KC', env.RUNNER_NUMBER)] }} teardown_condition: "TESTS_PASSED" SUBGRAPH_API_URL: ${{ secrets.SUBGRAPH_API_URL }} @@ -155,7 +155,7 @@ jobs: - name: "Run Challenge Reward System tests" uses: 0chain/actions/run-system-tests@feature/tokenomics_suite with: - repo_snapshots_branch: current-sprint + repo_snapshots_branch: staging system_tests_branch: ${{ env.CURRENT_BRANCH }} network: ${{ env.NETWORK_URL }} svc_account_secret: ${{ secrets.SVC_ACCOUNT_SECRET }} @@ -179,7 +179,7 @@ jobs: if: github.event_name == 'push' || github.event.inputs.existing_network == '' uses: 0chain/actions/deploy-0chain@feature/tokenomics_suite with: - repo_snapshots_branch: current-sprint + repo_snapshots_branch: staging kube_config: ${{ secrets[format('DEV{0}KC', env.RUNNER_NUMBER)] }} teardown_condition: "TESTS_PASSED" SUBGRAPH_API_URL: ${{ secrets.SUBGRAPH_API_URL }} @@ -192,7 +192,7 @@ jobs: - name: "Run Challenge Timings System tests" uses: 0chain/actions/run-system-tests@feature/tokenomics_suite with: - repo_snapshots_branch: current-sprint + repo_snapshots_branch: staging system_tests_branch: ${{ env.CURRENT_BRANCH }} network: ${{ env.NETWORK_URL }} svc_account_secret: ${{ secrets.SVC_ACCOUNT_SECRET }} @@ -214,7 +214,7 @@ jobs: if: github.event_name == 'push' || github.event.inputs.existing_network == '' uses: 0chain/actions/deploy-0chain-2b2v@feature/tokenomics_suite with: - repo_snapshots_branch: current-sprint + repo_snapshots_branch: staging kube_config: ${{ secrets[format('DEV{0}KC', env.RUNNER_NUMBER)] }} teardown_condition: "TESTS_PASSED" SUBGRAPH_API_URL: ${{ secrets.SUBGRAPH_API_URL }} @@ -227,7 +227,7 @@ jobs: - name: "Run Slash Rewards System tests" uses: 0chain/actions/run-system-tests@feature/tokenomics_suite with: - repo_snapshots_branch: current-sprint + repo_snapshots_branch: staging system_tests_branch: ${{ env.CURRENT_BRANCH }} network: ${{ env.NETWORK_URL }} svc_account_secret: ${{ secrets.SVC_ACCOUNT_SECRET }} @@ -248,7 +248,7 @@ jobs: if: github.event_name == 'push' || github.event.inputs.existing_network == '' uses: 0chain/actions/deploy-0chain-2b2v@feature/tokenomics_suite with: - repo_snapshots_branch: current-sprint + repo_snapshots_branch: staging kube_config: ${{ secrets[format('DEV{0}KC', env.RUNNER_NUMBER)] }} teardown_condition: "TESTS_PASSED" SUBGRAPH_API_URL: ${{ secrets.SUBGRAPH_API_URL }} @@ -261,7 +261,7 @@ jobs: - name: "Run Read Rewards System tests" uses: 0chain/actions/run-system-tests@feature/tokenomics_suite with: - repo_snapshots_branch: current-sprint + repo_snapshots_branch: staging system_tests_branch: ${{ env.CURRENT_BRANCH }} network: ${{ env.NETWORK_URL }} svc_account_secret: ${{ secrets.SVC_ACCOUNT_SECRET }} @@ -282,7 +282,7 @@ jobs: if: github.event_name == 'push' || github.event.inputs.existing_network == '' uses: 0chain/actions/deploy-0chain-3b3v@feature/tokenomics_suite with: - repo_snapshots_branch: current-sprint + repo_snapshots_branch: staging kube_config: ${{ secrets[format('DEV{0}KC', env.RUNNER_NUMBER)] }} teardown_condition: "TESTS_PASSED" SUBGRAPH_API_URL: ${{ secrets.SUBGRAPH_API_URL }} @@ -295,7 +295,7 @@ jobs: - name: "Run Allocation Add Or Replace Blobber System tests" uses: 0chain/actions/run-system-tests@feature/tokenomics_suite with: - repo_snapshots_branch: current-sprint + repo_snapshots_branch: staging system_tests_branch: ${{ env.CURRENT_BRANCH }} network: ${{ env.NETWORK_URL }} svc_account_secret: ${{ secrets.SVC_ACCOUNT_SECRET }} diff --git a/tests/tokenomics_tests/allocation_test.go b/tests/tokenomics_tests/allocation_test.go index 8ecb12e9fd..3f28adb1de 100644 --- a/tests/tokenomics_tests/allocation_test.go +++ b/tests/tokenomics_tests/allocation_test.go @@ -125,7 +125,7 @@ func TestAllocationRewards(testSetup *testing.T) { require.Nil(t, err, "Error canceling allocation", strings.Join(output, "\n")) // sleep for 10 seconds - time.Sleep(10 * time.Second) + time.Sleep(30 * time.Second) alloc = utils.GetAllocation(t, allocationId) require.Equal(t, alloc.MovedToChallenge, movedToChallengePool, "MovedToChallenge should not change") @@ -137,7 +137,7 @@ func TestAllocationRewards(testSetup *testing.T) { totalBlobberChallengereward += int64(v.(float64)) } - require.Equal(t, movedToChallengePool-alloc.MovedBack, totalBlobberChallengereward, "Total Blobber Challenge Reward should be less than MovedToChallenge") + require.InEpsilon(t, movedToChallengePool-alloc.MovedBack, totalBlobberChallengereward, 0.05, "Total Blobber Challenge Reward should be less than MovedToChallenge") // cancelation Rewards alloccancelationRewards, err := getAllocationcancelationReward(t, allocationId, blobberListString) @@ -565,7 +565,7 @@ func TestAddOrReplaceBlobberAllocationRewards(testSetup *testing.T) { func getAllocationcancelationReward(t *test.SystemTest, allocationID string, blobberList []string) ([]int64, error) { StorageScAddress := "6dba10422e368813802877a85039d3985d96760ed844092319743fb3a76712d7" sharderBaseUrl := utils.GetSharderUrl(t) - url := fmt.Sprintf(sharderBaseUrl+"/v1/screst/"+StorageScAddress+"/cancelation-rewards?allocation_id=?", allocationID) + url := fmt.Sprintf(sharderBaseUrl + "/v1/screst/" + StorageScAddress + "/cancelation-rewards?" + "allocation_id=" + allocationID) t.Log("URL : ", url)