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

Refacto/native provider #123

Merged
merged 2 commits into from
Oct 20, 2023
Merged

Refacto/native provider #123

merged 2 commits into from
Oct 20, 2023

Conversation

l0r1s
Copy link
Contributor

@l0r1s l0r1s commented Oct 19, 2023

  • Split native provider into multiple smaller files and each with their respective tests
  • Update ProviderNode.command() to ProviderNode.program()
  • Update ProviderNamespace.id() to ProviderNamespace.name()

@l0r1s l0r1s requested review from pepoviola and wirednkod October 19, 2023 12:33
@l0r1s l0r1s force-pushed the refacto/native-provider branch from 2a2205d to 5a2b175 Compare October 19, 2023 12:35
@@ -215,8 +215,8 @@ impl<T: FileSystem> Network<T> {
self.parachains.insert(para.para_id, para);
}

pub(crate) fn id(&self) -> &str {
self.ns.id()
pub(crate) fn name(&self) -> &str {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
pub(crate) fn name(&self) -> &str {
pub(crate) fn name_space(&self) -> &str {

@l0r1s l0r1s force-pushed the refacto/native-provider branch from 5a2b175 to 633b2fa Compare October 19, 2023 12:54
@github-actions
Copy link

Coverage after merging refacto/native-provider into main

77.54%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
crates/configuration/src
   global_settings.rs98.46%100%93.33%99.13%
   hrmp_channel.rs95.88%100%89.47%97.44%
   network.rs99.22%100%97.78%99.36%117, 122, 130, 175, 80, 88
   parachain.rs97.59%100%95.19%97.85%51–53, 551–560, 67–70
   relaychain.rs96.60%100%92.65%97.09%338–347, 77–79
   utils.rs40%100%40%40%11–13, 15–17, 19–21
crates/configuration/src/shared
   errors.rs50%100%50%50%
   helpers.rs100%100%100%100%
   node.rs98.32%100%92.68%98.93%124, 130
   resources.rs96.09%100%94.52%96.43%102, 114, 126–128, 147–150
   types.rs90.40%100%84.16%92.22%279–281, 350–352, 378–379, 381–383, 60–62
crates/orchestrator/src
   errors.rs0%100%0%0%8
   lib.rs0%100%0%0%100–103, 105–108, 112–115, 117–123, 125, 129, 131–146, 150–173, 177–186, 189, 192–196, 198, 200–204, 207–225, 227–232, 234–255, 259–261, 264, 267–272, 274–277, 280–284, 287, 289–302, 304–306, 309–313, 315, 317–330, 332–335, 337–339, 343–345, 347–371, 379, 383–384, 394, 401–403, 405–414, 416–417, 419–427, 429–436, 438–439, 44, 440–445, 447–449, 45, 450–458, 46, 461, 47–49, 51–56, 58–64, 66–69, 75, 77–92, 98–99
   network.rs0%100%0%0%100–108, 111–117, 119–127, 130–155, 157–168, 171, 173–177, 185–188, 190, 192, 194–196, 199–204, 206–208, 210–212, 214–216, 218–220, 222–224, 226–228, 230–232, 32–40, 43, 56–70, 77–82, 85–94, 96, 98–99
   network_spec.rs93.67%100%83.33%95.52%11, 38
   spawner.rs0%100%0%0%100–106, 108, 112–114, 117–119, 121, 127–147, 149, 151–168, 17, 40–53, 55–56, 58, 60–63, 67–68, 70, 73–93, 95–99
crates/orchestrator/src/generators
   bootnode_addr.rs97.20%100%100%96.84%
   chain_spec.rs3.24%100%5%3.08%100–111, 113–128, 130, 135–148, 151–157, 159–161, 164–192, 194–197, 199–201, 203–216, 218–219, 22, 220, 223–225, 227, 229–241, 243, 246–251, 253–254, 256–269, 271, 274–279, 281–282, 285–298, 300–305, 307–309, 311–313, 316–321, 323–352, 355, 358–361, 364, 366–367, 369–379, 38, 380–384, 386, 388–389, 392–397, 405–443, 454–459, 46, 460–462, 472–480, 482–494, 496–504, 507–509, 513–516, 518–519, 524–535, 539–552, 554, 557–558, 561–567, 569–574, 580–585, 587, 589, 591–598, 600–603, 606–607, 611–612, 614, 616–617, 619–623, 625–628, 630, 632–633, 635–636, 638–640, 642–644, 646–648, 651–653, 656–660, 662, 664–672, 674–675, 680–687, 689–699, 703–706, 708, 710, 712–717, 719–729, 731–746, 748–749, 75, 750–755, 757, 76, 761–769, 77, 770–781, 783, 792–802, 804, 806–823, 825–829, 831, 833, 84–87, 95–99
   command.rs0%100%0%0%100–112, 114–120, 122, 125–130, 132–133, 136–148, 15, 150, 153–155, 157–158, 16, 161–169, 17, 170–179, 18, 180–189, 19, 190–197, 199, 20, 201, 203–209, 21, 210–219, 22, 220–224, 226–229, 23, 231–233, 235–239, 24, 240–243, 246–250, 252–256, 258, 261–269, 271, 274–290, 293–298, 300, 303–305, 307–308, 311–333, 335, 337, 44–62, 64–66, 68–76, 79–97
   errors.rs0%100%0%0%4
   identity.rs82.35%100%60%86.21%13
   key.rs95.05%100%84.62%96.59%31
   keystore.rs0%100%0%0%19–26, 28–31, 34–46, 48–55, 57–64, 66, 68–86
   para_artifact.rs15.94%100%10%16.95%12, 18, 25, 44–46, 48–64, 66–69, 72–81, 83–88, 92–93
   port.rs93.75%100%83.33%96.15%
crates/orchestrator/src/network
   node.rs0%100%0%0%10, 100–105, 107–109, 111–114, 116–120, 124–132, 24–39, 43–46, 50–53, 56–59, 66–71, 81–90, 93–95, 97, 99
   parachain.rs0%100%0%0%100, 102–105, 15, 25–33, 35–47, 49–53, 56–60, 63–70, 72, 74, 77–82, 85–86, 88–93, 97–99
   relaychain.rs0%100%0%0%14–21, 5
crates/orchestrator/src/network_helper
   verifier.rs0%100%0%0%10–11, 16, 18–25, 27–32, 34, 7–9
crates/orchestrator/src/network_spec
   node.rs39.17%100%16.67%40.35%108, 146–150, 152–153, 155, 158, 16, 160–163, 165–168, 173–178, 180, 183, 185–215, 217, 90–91, 93–96
   parachain.rs72.04%100%50%73.03%100, 107, 125, 130–133, 136, 147–150, 153, 17, 71–73, 76, 78–80, 86, 95
   relaychain.rs88.71%100%66.67%91.07%100, 17, 70, 93
crates/orchestrator/src/shared
   types.rs26.09%100%11.76%34.48%15, 30, 36, 45–49, 52, 61, 72
crates/prom-metrics-parser/src
   lib.rs91.94%100%80%92.98%105, 127, 55–57, 7, 81
crates/provider/src
   lib.rs50%100%50%50%
crates/provider/src/native
   helpers.rs89.25%100%100%88.37%30–31, 36–38, 59, 90, 94, 98
   namespace.rs90.80%100%87.18%91.11%108–112, 183, 202, 209, 215, 217, 224, 226–227, 241, 306, 313, 318, 323, 328, 335, 348, 418, 426, 452, 457, 461, 481, 485, 520, 527, 543, 581, 585, 73
   node.rs92.27%100%91.45%92.36%1034, 1060, 1130, 116, 1172, 1207, 1218, 1243, 1247–1249, 1252, 1284, 156, 165, 189, 201, 209, 221, 235, 255, 260, 273, 322, 333, 367, 378, 392, 398, 435, 446, 478, 486, 513, 521, 560, 57, 575, 58, 580, 59, 590, 61, 615, 62, 627, 63, 656, 666, 682, 689, 715, 739, 777, 781–783, 786, 812, 848, 85–87, 872, 89–91, 93, 931, 94–95, 970
   provider.rs97.62%100%96.30%97.87%15, 179, 85
crates/provider/src/shared
   types.rs84.47%100%74.29%86.41%123, 140–146, 15–18, 230, 249–256, 79
crates/support/src
   fs.rs75%100%66.67%80%
   net.rs0%100%0%0%10, 4–9
   process.rs100%100%100%100%
crates/support/src/fs
   in_memory.rs95.55%100%96.45%95.37%108, 252, 276, 327, 379, 387, 395, 403, 41–42, 425, 43, 433, 44, 46, 48–51, 53, 548, 570, 58, 598, 615, 633, 640, 659, 686, 703
   local.rs96.23%100%93.98%96.77%63, 8, 89–94
crates/support/src/process
   fake.rs82.47%100%84.62%82.03%126–131, 147, 205, 22, 229–230, 232–249, 302, 319–323, 333, 360, 39–40, 47, 63, 82, 91
   os.rs0%100%0%0%100–102, 16–18, 20–23, 25–27, 29–32, 34–36, 38–40, 43, 47–52, 54–56, 58–60, 62–64, 66–68, 70–71, 76–82, 84–89, 9, 91–95, 97–99
crates/test-runner/src
   lib.rs100%100%100%100%

@pepoviola pepoviola merged commit a1b87d6 into main Oct 20, 2023
4 checks passed
@pepoviola pepoviola deleted the refacto/native-provider branch October 20, 2023 15:00
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.

3 participants