Repository: getmoto/moto
Pull request #7496 (2024-03-20 07:39:57)

updated default value for share status in route53resolver
# Changes
- Updated default value for `shared_status` in route53resolver
- Removed unused code from `Makefile` which was used for terraform tests
- Updated the test cases

codecov[bot]: ## [Codecov](https://app.codecov.io/gh/getmoto/moto/pull/7496?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 94.05%. Comparing base [(`9aef694`)](https://app.codecov.io/gh/getmoto/moto/commit/9aef6944da6a6f1b84be99cefb34f1724e6ca58f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto) to head [(`ad546a7`)](https://app.codecov.io/gh/getmoto/moto/pull/7496?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto).
> Report is 121 commits behind head on master.


<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##           master    #7496      +/-   ##
==========================================
- Coverage   95.88%   94.05%   -1.83%     
==========================================
  Files         843     1064     +221     
  Lines       82578    91428    +8850     
==========================================
+ Hits        79178    85991    +6813     
- Misses       3400     5437    +2037     
```

| [Flag](https://app.codecov.io/gh/getmoto/moto/pull/7496/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto) | Coverage Δ | |
|---|---|---|
| [servertests](https://app.codecov.io/gh/getmoto/moto/pull/7496/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto) | `29.65% <0.00%> (-2.87%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/getmoto/moto/pull/7496/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto) | `94.02% <100.00%> (-1.83%)` | :arrow_down: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto#carryforward-flags-in-the-pull-request-comment) to find out more.


</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/getmoto/moto/pull/7496?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getmoto).


Patch:
diff --git a/Makefile b/Makefile
index 33e277ee3..6804e76aa 100644
--- a/Makefile
+++ b/Makefile
@@ -43,12 +43,6 @@ test-only:
 
 test: lint test-only
 
-terraformtests:
-	@echo "Make sure that the MotoServer is already running on port 4566 (moto_server -p 4566)"
-	@echo "USAGE: make terraformtests SERVICE_NAME=acm TEST_NAMES=TestAccACMCertificate"
-	@echo ""
-	cd tests/terraformtests && bin/run_go_test $(SERVICE_NAME) "$(TEST_NAMES)"
-
 test_server:
 	@TEST_SERVER_MODE=true pytest -sv --cov=moto --cov-report xml ./tests/
 
diff --git a/moto/route53resolver/models.py b/moto/route53resolver/models.py
index 4e9770d52..572b1b73b 100644
--- a/moto/route53resolver/models.py
+++ b/moto/route53resolver/models.py
@@ -122,7 +122,7 @@ class ResolverRule(BaseModel):  # pylint: disable=too-many-instance-attributes
             f"[Trace id: 1-{mock_random.get_random_hex(8)}-{mock_random.get_random_hex(24)}] "
             f"Successfully created Resolver Rule"
         )
-        self.share_status = "SHARED_WITH_ME"
+        self.share_status = "NOT_SHARED"
         self.creation_time = datetime.now(timezone.utc).isoformat()
         self.modification_time = datetime.now(timezone.utc).isoformat()
 


Test patch:
diff --git a/tests/test_route53resolver/test_route53resolver_rule.py b/tests/test_route53resolver/test_route53resolver_rule.py
index 3cd5e178d..7ccf78a90 100644
--- a/tests/test_route53resolver/test_route53resolver_rule.py
+++ b/tests/test_route53resolver/test_route53resolver_rule.py
@@ -160,7 +160,7 @@ def test_route53resolver_create_resolver_rule():  # pylint: disable=too-many-loc
     assert rule["TargetIps"][0]["Port"] == target_ips[0]["Port"]
     assert rule["ResolverEndpointId"] == endpoint_id
     assert rule["OwnerId"] == ACCOUNT_ID
-    assert rule["ShareStatus"] == "SHARED_WITH_ME"
+    assert rule["ShareStatus"] == "NOT_SHARED"
 
     time_format = "%Y-%m-%dT%H:%M:%S.%f+00:00"
     now = datetime.now(timezone.utc).replace(tzinfo=None)