Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix prompt text test occasional failure #7722

Merged
merged 5 commits into from
Jul 8, 2024

Conversation

brooke-hamilton
Copy link
Contributor

Description

Fixes an issue in which the confirm value test in /pkg/cli/prompt/text sometimes fails due to the timing of the text rendering in the test model.

The test was checking the output before calling TestModel.FinalModel(), which resulted in an empty result most of the time, but not all of the time. The other assertions made after calling FinalModel() showed that the code was operating as designed, which means we can remove the interim check that tests for an empty output. This change simply removes the code that checks the output before calling FinalModel().

Type of change

This pull request fixes a bug in Radius and has an approved issue.

Fixes: #7721

Fixes issue radius-project#7721

Signed-off-by: Brooke Hamilton <brooke@azuredev.io>
@brooke-hamilton brooke-hamilton requested review from a team as code owners July 1, 2024 23:02
Signed-off-by: Brooke Hamilton <brooke@azuredev.io>
@rynowak
Copy link
Contributor

rynowak commented Jul 2, 2024

Thanks @brooke-hamilton for digging in and fixing this. Taking a look....

Copy link
Contributor

@rynowak rynowak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for digging into this!

brooke-hamilton and others added 2 commits July 3, 2024 21:35
Signed-off-by: Brooke Hamilton <brooke@azuredev.io>
@radius-functional-tests
Copy link

radius-functional-tests bot commented Jul 5, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository brooke-hamilton/radius
Commit ref 2416e58
Unique ID funceed81e69aa
Image tag pr-funceed81e69aa
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-funceed81e69aa
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-funceed81e69aa
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-funceed81e69aa
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-funceed81e69aa
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting msgrp functional tests...
⌛ Starting samples functional tests...
⌛ Starting daprrp functional tests...
⌛ Starting kubernetes functional tests...
⌛ Starting cli functional tests...
⌛ Starting datastoresrp functional tests...
⌛ Starting shared functional tests...
✅ msgrp functional tests succeeded
✅ ucp functional tests succeeded
✅ kubernetes functional tests succeeded
✅ samples functional tests succeeded
✅ daprrp functional tests succeeded
✅ cli functional tests succeeded
✅ datastoresrp functional tests succeeded
✅ shared functional tests succeeded

Copy link
Contributor

@ytimocin ytimocin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Copy link

codecov bot commented Jul 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.99%. Comparing base (534cba6) to head (c4aca8b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7722      +/-   ##
==========================================
- Coverage   61.00%   60.99%   -0.02%     
==========================================
  Files         520      520              
  Lines       27010    27010              
==========================================
- Hits        16478    16474       -4     
- Misses       9080     9082       +2     
- Partials     1452     1454       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@rynowak rynowak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look great, and a big improvement to the readability of the tests.

@rynowak
Copy link
Contributor

rynowak commented Jul 8, 2024

@ytimocin - can you help get this merged?

@rynowak rynowak temporarily deployed to functional-tests July 8, 2024 19:35 — with GitHub Actions Inactive
@radius-functional-tests
Copy link

radius-functional-tests bot commented Jul 8, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository brooke-hamilton/radius
Commit ref c4aca8b
Unique ID funca2377b6596
Image tag pr-funca2377b6596
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-funca2377b6596
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-funca2377b6596
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-funca2377b6596
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-funca2377b6596
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting kubernetes functional tests...
⌛ Starting samples functional tests...
⌛ Starting ucp functional tests...
⌛ Starting daprrp functional tests...
⌛ Starting cli functional tests...
⌛ Starting shared functional tests...
⌛ Starting datastoresrp functional tests...
✅ msgrp functional tests succeeded
✅ kubernetes functional tests succeeded
✅ ucp functional tests succeeded
✅ daprrp functional tests succeeded
✅ cli functional tests succeeded
✅ datastoresrp functional tests succeeded
✅ shared functional tests succeeded

@lakshmimsft lakshmimsft merged commit 5d448d5 into radius-project:main Jul 8, 2024
16 checks passed
sk593 pushed a commit that referenced this pull request Jul 22, 2024
# Description

Fixes an issue in which the `confirm value` test in
`/pkg/cli/prompt/text` sometimes fails due to the timing of the text
rendering in the test model.

The test was checking the output before calling
`TestModel.FinalModel()`, which resulted in an empty result most of the
time, but not all of the time. The other assertions made after calling
`FinalModel()` showed that the code was operating as designed, which
means we can remove the interim check that tests for an empty output.
This change simply removes the code that checks the output before
calling `FinalModel()`.

## Type of change

This pull request fixes a bug in Radius and has an approved issue.

Fixes: #7721

---------

Signed-off-by: Brooke Hamilton <brooke@azuredev.io>
Co-authored-by: Brooke Hamilton <brooke@azuredev.io>
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
Reshrahim pushed a commit to Reshrahim/radius that referenced this pull request Aug 27, 2024
# Description

Fixes an issue in which the `confirm value` test in
`/pkg/cli/prompt/text` sometimes fails due to the timing of the text
rendering in the test model.

The test was checking the output before calling
`TestModel.FinalModel()`, which resulted in an empty result most of the
time, but not all of the time. The other assertions made after calling
`FinalModel()` showed that the code was operating as designed, which
means we can remove the interim check that tests for an empty output.
This change simply removes the code that checks the output before
calling `FinalModel()`.

## Type of change

This pull request fixes a bug in Radius and has an approved issue.

Fixes: radius-project#7721

---------

Signed-off-by: Brooke Hamilton <brooke@azuredev.io>
Co-authored-by: Brooke Hamilton <brooke@azuredev.io>
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
Signed-off-by: Reshma Abdul Rahim <reshmarahim.abdul@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prompt text test occasionally fails
4 participants