-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[antlir2][image_test] add hostname option
Summary: Small missing feature Test Plan: ``` ❯ buck2 test fbcode//antlir/antlir2/testing/tests:test-hostname fbcode//antlir/antlir2/testing/tests:test-hostname-booted Buck UI: https://www.internalfb.com/buck2/cd5d357f-4089-45b9-a221-f827d14d229c Test UI: https://www.internalfb.com/intern/testinfra/testrun/17169973583492924 Network: Up: 32MiB Down: 209MiB (reSessionID-8184c46f-74df-4daa-a8ba-2270c0d778ca) Jobs completed: 267. Time elapsed: 1:05.6s. Cache hits: 0%. Commands: 169 (cached: 0, remote: 1, local: 168). Fallback: 1/169 Tests finished: Pass 2. Fail 0. Fatal 0. Skip 0. Build failure 0 ``` Reviewed By: r1mikey Differential Revision: D49756197 fbshipit-source-id: d45001c530d6ed35e799660da373deaf5fa12551
- Loading branch information
1 parent
2132de3
commit e15b743
Showing
7 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
import socket | ||
import unittest | ||
|
||
|
||
class TestHostname(unittest.TestCase): | ||
def setUp(self) -> None: | ||
super().setUp() | ||
|
||
def test_hostname(self) -> None: | ||
self.assertEqual(socket.gethostname(), "antlir2-test-hostname") |