예제 #1
0
 def test_default_channel_for_other_snap(self):
     self.assertThat(str(_get_snap_channel("core")),
                     Equals("latest/stable"))
     self.assertThat(
         self.fake_logger.output,
         Not(
             Contains(
                 "SNAPCRAFT_BUILD_ENVIRONMENT_CHANNEL_SNAPCRAFT is set: installing "
                 "snapcraft from")),
     )
예제 #2
0
 def test_channel_for_snapcraft_from_env(self):
     self.useFixture(
         fixtures.EnvironmentVariable(
             "SNAPCRAFT_BUILD_ENVIRONMENT_CHANNEL_SNAPCRAFT",
             "latest/edge"))
     self.assertThat(str(_get_snap_channel("snapcraft")),
                     Equals("latest/edge"))
     self.assertThat(
         self.fake_logger.output,
         Contains(
             "SNAPCRAFT_BUILD_ENVIRONMENT_CHANNEL_SNAPCRAFT is set: installing "
             "snapcraft from latest/edge"),
     )
예제 #3
0
 def test_channel_for_other_snap_not_affected_by_env(self):
     self.useFixture(
         fixtures.EnvironmentVariable(
             "SNAPCRAFT_BUILD_ENVIRONMENT_CHANNEL_SNAPCRAFT", "latest/edge"
         )
     )
     self.assertThat(_get_snap_channel("core"), Equals("latest/stable"))
     self.assertThat(
         self.fake_logger.output,
         Not(
             Contains(
                 "SNAPCRAFT_BUILD_ENVIRONMENT_CHANNEL_SNAPCRAFT is set: installing "
                 "snapcraft from"
             )
         ),
     )