|
| 1 | +// |
| 2 | +// TestEnvironment.swift |
| 3 | +// PostgresClientKit |
| 4 | +// |
| 5 | +// Copyright 2020 David Pitfield and the PostgresClientKit contributors |
| 6 | +// |
| 7 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | +// you may not use this file except in compliance with the License. |
| 9 | +// You may obtain a copy of the License at |
| 10 | +// |
| 11 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | +// |
| 13 | +// Unless required by applicable law or agreed to in writing, software |
| 14 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | +// See the License for the specific language governing permissions and |
| 17 | +// limitations under the License. |
| 18 | +// |
| 19 | + |
| 20 | +/// The configuration for unit testing. |
| 21 | +/// |
| 22 | +/// Edit the properties' default values to reflect your environment. |
| 23 | +struct TestEnvironment { |
| 24 | + |
| 25 | + /// The hostname or IP address of the Postgres server. |
| 26 | + let postgresHost = "127.0.0.1" |
| 27 | + |
| 28 | + /// The port number of the Postgres server. |
| 29 | + let postgresPort = 5432 |
| 30 | + |
| 31 | + /// The name of the database on the Postgres server. |
| 32 | + let postgresDatabase = "postgresclientkittest" |
| 33 | + |
| 34 | + /// The username of a Postgres user who can connect by `Credential.trust`. |
| 35 | + let terryUsername = "terry_postgresclientkittest" |
| 36 | + |
| 37 | + /// The password of the Postgres user identified by `terryUsername`. |
| 38 | + let terryPassword = "welcome1" |
| 39 | + |
| 40 | + /// The username of a Postgres user who can connect by `Credential.cleartextPassword`. |
| 41 | + let charlieUsername = "charlie_postgresclientkittest" |
| 42 | + |
| 43 | + /// The password of the Postgres user identified by `charlieUsername`. |
| 44 | + let charliePassword = "welcome1" |
| 45 | + |
| 46 | + /// The username of a Postgres user who can connect by `Credential.md5Password`. |
| 47 | + let maryUsername = "mary_postgresclientkittest" |
| 48 | + |
| 49 | + /// The password of the Postgres user identified by `maryUsername`. |
| 50 | + let maryPassword = "welcome1" |
| 51 | + |
| 52 | + |
| 53 | + /// The current test environment. |
| 54 | + static let current = TestEnvironment() |
| 55 | +} |
| 56 | + |
| 57 | +// EOF |
0 commit comments