Esempio n. 1
0
    def test_parse_volumes(self):
        """Parsing volumes parameter
        """
        volumes, binds = utils.parse_volumes(["/home/local:/home/container"])
        self.assertEquals({"/home/container":{}}, volumes)
        self.assertEquals(["/home/local:/home/container"], binds)

        volumes, binds = utils.parse_volumes(
            ["/home/local:/home/container", "/container"])
        self.assertEquals(
            {"/home/container", "/container"}, set(volumes.keys()))
        self.assertEquals(["/home/local:/home/container"], binds)
Esempio n. 2
0
    def test_parse_volumes(self):
        """Parsing volumes parameter
        """
        volumes, binds = utils.parse_volumes(["/home/local:/home/container"])
        self.assertEquals({"/home/container": {}}, volumes)
        self.assertEquals(["/home/local:/home/container"], binds)

        volumes, binds = utils.parse_volumes(
            ["/home/local:/home/container", "/container"])
        self.assertEquals({"/home/container", "/container"},
                          set(volumes.keys()))
        self.assertEquals(["/home/local:/home/container"], binds)
Esempio n. 3
0
    def test_parse_volumes_invalid_params(self):
        self.assertEquals(
            ({}, []), utils.parse_volumes(None))

        self.assertEquals(
            ({}, []), utils.parse_volumes(""))
Esempio n. 4
0
    def test_parse_volumes_invalid_params(self):
        self.assertEquals(({}, []), utils.parse_volumes(None))

        self.assertEquals(({}, []), utils.parse_volumes(""))