|
15 | 15 | IncorrectLinkSyntax, |
16 | 16 | IncorrectMonospaceSyntax, |
17 | 17 | InvalidChild, |
| 18 | + InvalidChildCount, |
18 | 19 | InvalidDirectiveStructure, |
19 | 20 | InvalidField, |
20 | 21 | InvalidLiteralInclude, |
@@ -4603,50 +4604,117 @@ def test_valid_composable_tutorial() -> None: |
4603 | 4604 | path, |
4604 | 4605 | """ |
4605 | 4606 | .. composable-tutorial:: |
4606 | | - :options: interface, language, cluster-topology, cloud-provider |
4607 | | - :defaults: driver, nodejs, repl, gcp |
| 4607 | + :options: interface, language, deployment-type, cloud-provider |
| 4608 | + :defaults: driver, nodejs, atlas, gcp |
4608 | 4609 |
|
4609 | 4610 | .. selected-content:: |
4610 | | - :selections: driver, nodejs, repl, gcp |
| 4611 | + :selections: driver, nodejs, atlas, gcp |
4611 | 4612 |
|
4612 | 4613 | This content will only be shown when the selections are as follows: |
4613 | 4614 | Interface - Drivers |
4614 | | - Language - Node |
4615 | | - Deployment Type - Replication |
| 4615 | + Language - NodeJS |
| 4616 | + Deployment Type - Atlas |
4616 | 4617 | Cloud Provider - GCP |
4617 | 4618 |
|
4618 | 4619 | .. selected-content:: |
4619 | | - :selections: atlas-ui, None, repl, aws |
| 4620 | + :selections: driver, c, atlas, gcp |
| 4621 | +
|
| 4622 | + This content will only be shown when the selections are as follows: |
| 4623 | + Interface - Drivers |
| 4624 | + Language - C |
| 4625 | + Deployment Type - atlas |
| 4626 | + Cloud Provider - GCP |
| 4627 | +
|
| 4628 | + .. selected-content:: |
| 4629 | + :selections: driver, cpp, atlas, aws |
| 4630 | +
|
| 4631 | + This content will only be shown when the selections are as follows: |
| 4632 | + Interface - Drivers |
| 4633 | + Language - CPP |
| 4634 | + Deployment Type - atlas |
| 4635 | + Cloud Provider - AWS |
| 4636 | +
|
| 4637 | +
|
| 4638 | + .. selected-content:: |
| 4639 | + :selections: atlas-admin-api, None, atlas, gcp |
4620 | 4640 |
|
4621 | 4641 | This content will only be shown when the selections are as follows: |
4622 | | - Interface - Atlas UI |
4623 | | - Deployment Type - Replication |
| 4642 | + Interface - Atlas Admin API |
| 4643 | + Deployment Type - atlas |
4624 | 4644 | Cloud Provider - GCP |
| 4645 | +
|
| 4646 | +
|
| 4647 | + .. selected-content:: |
| 4648 | + :selections: atlas-admin-api, None, atlas, aws |
| 4649 | +
|
| 4650 | + This content will only be shown when the selections are as follows: |
| 4651 | + Interface - Atlas Admin API |
| 4652 | + Deployment Type - Atlas |
| 4653 | + Cloud Provider - AWS |
| 4654 | +
|
| 4655 | +
|
| 4656 | +
|
| 4657 | + .. selected-content:: |
| 4658 | + :selections: atlas-admin-api, None, self, aws |
| 4659 | +
|
| 4660 | + This content will only be shown when the selections are as follows: |
| 4661 | + Interface - Atlas Admin API |
| 4662 | + Deployment Type - self |
| 4663 | + Cloud Provider - AWS |
4625 | 4664 | """, |
4626 | 4665 | ) |
4627 | | - |
4628 | 4666 | assert not diagnostics |
4629 | 4667 | check_ast_testing_string( |
4630 | 4668 | page.ast, |
4631 | 4669 | """ |
4632 | 4670 | <root fileid="test.rst"> |
4633 | 4671 | <directive domain="mongodb" name="composable-tutorial" |
4634 | | - composable_options="[{'value': 'interface', 'text': 'Interface', 'default': 'driver', 'dependencies': [], 'selections': [{'value': 'driver', 'text': 'Driver'}, {'value': 'atlas-ui', 'text': 'Atlas UI'}]}, {'value': 'language', 'text': 'Language', 'default': 'nodejs', 'dependencies': [{'interface': 'driver'}], 'selections': [{'value': 'nodejs', 'text': 'Node.js'}]}, {'value': 'cluster-topology', 'text': 'Cluster Topology', 'default': 'repl', 'dependencies': [], 'selections': [{'value': 'repl', 'text': 'Replica Set'}, {'value': 'repl', 'text': 'Replica Set'}]}, {'value': 'cloud-provider', 'text': 'Cloud Provider', 'default': 'gcp', 'dependencies': [], 'selections': [{'value': 'gcp', 'text': 'GCP'}, {'value': 'aws', 'text': 'AWS'}]}]"> |
| 4672 | + composable_options="[{'value': 'interface', 'text': 'Interface', 'default': 'driver', 'dependencies': [], 'selections': [{'value': 'driver', 'text': 'Driver'}, {'value': 'atlas-admin-api', 'text': 'Atlas Admin API'}]}, {'value': 'language', 'text': 'Language', 'default': 'nodejs', 'dependencies': [{'interface': 'driver'}], 'selections': [{'value': 'nodejs', 'text': 'Node.js'}, {'value': 'c', 'text': 'C'}, {'value': 'cpp', 'text': 'C++'}]}, {'value': 'deployment-type', 'text': 'Deployment Type', 'default': 'atlas', 'dependencies': [], 'selections': [{'value': 'atlas', 'text': 'Atlas (Cloud)'}, {'value': 'self', 'text': 'Self-Managed (On-premises)'}]}, {'value': 'cloud-provider', 'text': 'Cloud Provider', 'default': 'gcp', 'dependencies': [], 'selections': [{'value': 'gcp', 'text': 'GCP'}, {'value': 'aws', 'text': 'AWS'}]}]"> |
4635 | 4673 | <directive domain="mongodb" name="selected-content" |
4636 | | - selections="{'interface': 'driver', 'language': 'nodejs', 'cluster-topology': 'repl', 'cloud-provider': 'gcp'}"> |
| 4674 | + selections="{'interface': 'driver', 'language': 'nodejs', 'deployment-type': 'atlas', 'cloud-provider': 'gcp'}"> |
4637 | 4675 | <paragraph><text>This content will only be shown when the selections are as follows: |
4638 | 4676 | Interface - Drivers |
4639 | | -Language - Node |
4640 | | -Deployment Type - Replication |
| 4677 | +Language - NodeJS |
| 4678 | +Deployment Type - Atlas |
4641 | 4679 | Cloud Provider - GCP</text></paragraph> |
4642 | 4680 | </directive> |
4643 | 4681 | <directive domain="mongodb" name="selected-content" |
4644 | | - selections="{'interface': 'atlas-ui', 'language': 'None', 'cluster-topology': 'repl', 'cloud-provider': 'aws'}"> |
| 4682 | + selections="{'interface': 'driver', 'language': 'c', 'deployment-type': 'atlas', 'cloud-provider': 'gcp'}"> |
4645 | 4683 | <paragraph><text>This content will only be shown when the selections are as follows: |
4646 | | -Interface - Atlas UI |
4647 | | -Deployment Type - Replication |
| 4684 | +Interface - Drivers |
| 4685 | +Language - C |
| 4686 | +Deployment Type - atlas |
4648 | 4687 | Cloud Provider - GCP</text></paragraph> |
4649 | 4688 | </directive> |
| 4689 | + <directive domain="mongodb" name="selected-content" |
| 4690 | + selections="{'interface': 'driver', 'language': 'cpp', 'deployment-type': 'atlas', 'cloud-provider': 'aws'}"> |
| 4691 | + <paragraph><text>This content will only be shown when the selections are as follows: |
| 4692 | +Interface - Drivers |
| 4693 | +Language - CPP |
| 4694 | +Deployment Type - atlas |
| 4695 | +Cloud Provider - AWS</text></paragraph> |
| 4696 | + </directive> |
| 4697 | + <directive domain="mongodb" name="selected-content" |
| 4698 | + selections="{'interface': 'atlas-admin-api', 'language': 'None', 'deployment-type': 'atlas', 'cloud-provider': 'gcp'}"> |
| 4699 | + <paragraph><text>This content will only be shown when the selections are as follows: |
| 4700 | +Interface - Atlas Admin API |
| 4701 | +Deployment Type - atlas |
| 4702 | +Cloud Provider - GCP</text></paragraph> |
| 4703 | + </directive> |
| 4704 | + <directive domain="mongodb" name="selected-content" |
| 4705 | + selections="{'interface': 'atlas-admin-api', 'language': 'None', 'deployment-type': 'atlas', 'cloud-provider': 'aws'}"> |
| 4706 | + <paragraph><text>This content will only be shown when the selections are as follows: |
| 4707 | +Interface - Atlas Admin API |
| 4708 | +Deployment Type - Atlas |
| 4709 | +Cloud Provider - AWS</text></paragraph> |
| 4710 | + </directive> |
| 4711 | + <directive domain="mongodb" name="selected-content" |
| 4712 | + selections="{'interface': 'atlas-admin-api', 'language': 'None', 'deployment-type': 'self', 'cloud-provider': 'aws'}"> |
| 4713 | + <paragraph><text>This content will only be shown when the selections are as follows: |
| 4714 | +Interface - Atlas Admin API |
| 4715 | +Deployment Type - self |
| 4716 | +Cloud Provider - AWS</text></paragraph> |
| 4717 | + </directive> |
4650 | 4718 | </directive> |
4651 | 4719 | </root> |
4652 | 4720 | """, |
@@ -4675,8 +4743,8 @@ def test_composable_tutorial_errors() -> None: |
4675 | 4743 | UnknownOptionId, |
4676 | 4744 | # invalid composable tutorial option cloud-providerr |
4677 | 4745 | UnknownOptionId, |
4678 | | - # invalid selection gcpp |
4679 | | - UnknownOptionId, |
| 4746 | + # invalid child count gcppgcpppppp |
| 4747 | + InvalidChildCount, |
4680 | 4748 | ] |
4681 | 4749 |
|
4682 | 4750 | _page, diagnostics = parse_rst( |
|
0 commit comments