docs: add a note about accessing the dev env's postgres database (#31874)
This commit is contained in:
parent
f235787703
commit
aacfe4d667
|
|
@ -89,6 +89,17 @@ For more env vars that affect your configuration, see this
|
|||
[superset_config.py](https://github.com/apache/superset/blob/master/docker/pythonpath_dev/superset_config.py)
|
||||
used in the `docker compose` context to assign env vars to the superset configuration.
|
||||
|
||||
### Accessing the postgres database
|
||||
Sometimes it's useful to access the database in the docker container directly.
|
||||
You can enter a `psql` shell (the official Postgres client) by running the following command:
|
||||
|
||||
```bash
|
||||
docker compose exec db psql -U superset
|
||||
```
|
||||
|
||||
Also note that the database is exposed on port 5432, so you can connect to it using your favorite
|
||||
Postgres client or even SQL Lab itselft directly in Superset by creating a new database connection
|
||||
to `localhost:5432`.
|
||||
|
||||
### Nuking the postgres database
|
||||
|
||||
|
|
|
|||
|
|
@ -62,11 +62,14 @@ describe('EmptyState', () => {
|
|||
tableName: WelcomeTable.Recents,
|
||||
},
|
||||
];
|
||||
|
||||
variants.forEach(variant => {
|
||||
it(`it renders an ${variant.tab} ${variant.tableName} empty state`, () => {
|
||||
it(`renders an ${variant.tab} ${variant.tableName} empty state`, () => {
|
||||
const wrapper = mount(<EmptyState {...variant} />);
|
||||
expect(wrapper).toExist();
|
||||
const textContainer = wrapper.find('.ant-empty-description');
|
||||
|
||||
// Select the first description node
|
||||
const textContainer = wrapper.find('.ant-empty-description').at(0);
|
||||
expect(textContainer.text()).toEqual(
|
||||
variant.tab === TableTab.Favorite
|
||||
? "You don't have any favorites yet!"
|
||||
|
|
@ -79,12 +82,19 @@ describe('EmptyState', () => {
|
|||
expect(wrapper.find('button')).toHaveLength(1);
|
||||
});
|
||||
});
|
||||
|
||||
recents.forEach(recent => {
|
||||
it(`it renders a ${recent.tab} ${recent.tableName} empty state`, () => {
|
||||
it(`renders a ${recent.tab} ${recent.tableName} empty state`, () => {
|
||||
const wrapper = mount(<EmptyState {...recent} />);
|
||||
expect(wrapper).toExist();
|
||||
const textContainer = wrapper.find('.ant-empty-description');
|
||||
|
||||
// Select the first description node
|
||||
const textContainer = wrapper.find('.ant-empty-description').at(0);
|
||||
|
||||
// Validate the image
|
||||
expect(wrapper.find('.ant-empty-image').children()).toHaveLength(1);
|
||||
|
||||
// Check the correct text is displayed
|
||||
expect(textContainer.text()).toContain(
|
||||
`Recently ${recent.tab?.toLowerCase()} charts, dashboards, and saved queries will appear here`,
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue